Your SlideShare is downloading. ×
Intro to WordPress Development: Tweaking your Theme
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Intro to WordPress Development: Tweaking your Theme

5,662

Published on

WordCamp Louisville 2011

WordCamp Louisville 2011

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,662
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Tweaking Your Theme
  • 2.
      • Guide new users to become more familiar with their theme
      • Tips to tweaking design
      • Share resources with easy to understand tutorials for helping users customize their themes
      • Why code snippets can be a better choice than plugins
      • A touch on child theming
    •  
  • 3.
    • You need to be familiar with WordPress (basic concepts of taxonomy, the loop, and at least the required functions to get a theme working.
    •  
    • You need to be familiar with PHP, HTML, CSS, and making graphics.
  • 4.
    • Basic
      • 404.php
      • archives.php
      • comments.php
      • footer.php
      • functions.php
      • header.php
      • index.php
      • page.php
      • search.php
      • sidebar.php
      • single.php
    • Others
    •  
      • author.php
      • category.php
      • home.php
    •  
    •  
    • More template files to consider at above link.
    •  
  • 5.
    • <!-- Start the Loop. -->
    • <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    •  
    • <div class=&quot;post&quot; id=&quot;post-<?php the_ID(); ?>&quot;> 
    •  
    • <h2><a href=&quot;<?php the_permalink() ?>&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to <?php the_title_attribute(); ?>&quot;><?php the_title(); ?></a></h2>
    •  
    • <small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
    •   <div class=&quot;entry&quot;> <?php the_content(); ?> </div>
    • <p class=&quot;postmetadata&quot;>Posted in <?php the_category(', '); ?></p></div>
    •  
    • <?php endwhile; else: ?>
    •  
    • <p>Sorry, no posts matched your criteria.</p> <?php endif; ?>
  • 6.
    • http://codex.wordpress.org/Child_Themes
    •  
    • A child theme basically overwrites some of the active parent theme to add style or certain functionalities not originally developed or designed in the original theme.
    •  
    •  
  • 7.
    • Plugins are great and normally versatile when you are changing from theme to another theme. Code snippets are theme specific.
    •  
    • While plugins are awesome, code snippets can cut down data resources and memory with your web host.
    •  
    • While adding snippets to another theme each time you change your theme is tedious, you are saving yourself grief from your host. Those of you with quickly growing sites will eventually have this issue and seek memcache, CDN and/or bigger hosting service plans. Do yourself a favor and give yourself a plugin diet.
  • 8.
    • Code Snippet to limit excerpt length
    • add_filter('excerpt_length', 'my_excerpt_length');
    • function my_excerpt_length($len) { return 100; }
    • Code Snippet for Post Thumbnail
    • add_theme_support( 'post-thumbnails' );
    • set_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails
    • add_image_size( 'single-post-thumbnail', 400, 9999 ); // Permalink thumbnail size
    • These simple things go in the functions.php template file.
  • 9.
      • WPhacks.com
      • JustinTadlock.com
      • Themeshaper.com
      • WPBeginner.com
      • WPAddict.net
      • Digwp.com
      • Perishablepress.com
      • WPRecipes.com
    •  
  • 10.
    • [email_address]
    • Twitter: @blondishnet OR @wpaddict
    • Facebook: fb.com/NileFlores or fb.com/WPAddict

×