If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
Is there any way I can change the way Categories and Tags are displayed at the beginning of each posts. The entire posts seems to be included by the function get_template_part(). Is there a smooth way of accessing this and change the function to the way I want?
The get_template_part() is a WP function which allows templates of sections of code (such as the loop) to be written once and called in many places, similar to the way CSS allows you to style something once and use it in many places.
The single.php file calls this function:
get_template_part( 'includes/loop', 'index' );
so, the file relative to the current file (single.php) is in the includes folder and called loop. In this case the index parameter means the file should be called loop-index.php (which falls back to loop.php if loop-index.php didn’t exist.
In this file, you can modify the meta info section to change the output of the Categories and Tags:
<span class='date-container'><span><?php the_time('d') ?></span><strong><?php the_time('M') ?> <?php the_time('Y') ?></strong></span>
<span class='comment-container'><?php comments_popup_link("<strong>0</strong> ".__('Comments','avia_framework'), "<strong>1</strong> ".__('Comment' ,'avia_framework'),
</div><!--end meta info-->
Hope this helps.
Guess, the meta info you referred to is describing the container with date and number of comments in it. Found what I was looking for just below. Thanx a lot for yours and Dude’s great support!
The topic ‘Change the way Categories and Tags are displayed’ is closed to new replies.