[theme: twenty twelve] Display Tags in only single post (3 posts)

  1. techtoll
    Posted 3 years ago #

    I want my tags to appear only on the single page and not on the index page. So i removed the above to statements of the following code of the functions.php

    if ( $tag_list ) {
    		//$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author" style="display:none;" > by %4$s</span>.', 'twentytwelve' );
    	//} elseif ( $categories_list ) {
    		//$utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author" style="display:none;"> by %4$s</span>.', 'twentytwelve' );
    	//} else {
    		$utility_text = __( '%3$s<span class="by-author"> </span>.', 'twentytwelve' );

    So I now only see the date. I want tags to appear on the single posts only. Any suggestions?

  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    You may be able to do that more easily in the CSS using specific selectors to target only the single page.

  3. Michael
    Forum Moderator
    Posted 3 years ago #

    I would not remove that section, but add a conditional is_single() to it:

    if ( $tag_list && is_single() ) {

Topic Closed

This topic has been closed to new replies.

About this Topic