Add categories and tags to posts on main index? (4 posts)

  1. gadgetfan
    Posted 2 years ago #

    This is a great theme. I see that the category and tag info for each post is visible on the single post pages, but not the posts shown on the index page. Is there a way to add the category and tag information for each post to the index view?


  2. victortihai
    Posted 2 years ago #


    You need to edit all files starting with content...

    The code you need to add is: <div class="category"><b><?php _e('Category:', 'wplook'); ?></b> <?php the_category(', ') ?><div class="end"></div></div>

    For example in content.php you need to add the code after the line 36.

  3. gadgetfan
    Posted 2 years ago #

    Thanks for the quick response. I'll have time to look at this a bit more this weekend. Just so I understand, though: I need to edit ALL of the content files just to get the category/tag info to show up on the index page?

    Also, the code you provided will add both category and tag info, or just category? Thanks again.

  4. victortihai
    Posted 2 years ago #

    Hi, Yes, you are right.

    Add this code for tags <?php if ( get_the_tag_list( '', ', ' ) ) { ?><div class="tag"> <b><?php _e('Tag:', 'wplook'); ?></b> <?php echo get_the_tag_list('',', ',''); ?>

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.