Customize Metadata for Individual WordPress Posts

By JacksonLast updated: Wednesday, May 12, 2010 • Save & Share3 Comments

Every post in WordPress 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 modify this  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:

  • <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.
  • Related Articles

    Leave a Reply