Pages

Search This Blog

Customize Metadata for Individual Posts

Every post has “metadata” contained inside of paragraph tags at the bottom of each blog post. This data is generated dynamically through the loop that pulls your content out of the database. You can easily edit, delete, or modify any of these pieces of data that are displayed with each entry, which can be found inside of the index.php file in your theme directory. The default look for the metadata section looks like this in WordPress 2.7.1:



  1. <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p>  
By editing the above section of code, you can choose to display only comments and categories, and even alter the characters that are displayed. For example the &#187;will display ». You have the option to remove those characters and use something more appropriate for your site’s look.

No comments:

Post a Comment

Related Posts Plugin for Blogger...
 

Blog Archive