• Resolved esthergibbons

    (@esthergibbons)


    I would like to remove the tags from the left side of the post.

    This is my blog: blog.esthergibbons.com

    You can see the numerous tags make the left side looks very busy.

    I would like to simply add some custom CSS.

    I tried:

    .tag-links {
    display: none;
    }

    Didn’t work.

    I tried this:

    body:not(.search-results) .cat-links, body:not(.search-results) .tags-links ,body:not(.search-results) article:not(.type-page) .comments-link {display: none;}

    But it also removed the comments and I couldn’t figure out how to edit it so the comments link still showed.

    Thanks for any help! ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • Let me try

    Hi,

    Put this function in your functions.php file

    function twentysixteen_entry_taxonomies() {
    	$categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
    	if ( $categories_list && twentysixteen_categorized_blog() ) {
    		printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    			_x( 'Categories', 'Used before category names.', 'twentysixteen' ),
    			$categories_list
    		);
    	}
    
    	/**
    	$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
    	if ( $tags_list ) {
    		printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    			_x( 'Tags', 'Used before tag names.', 'twentysixteen' ),
    			$tags_list
    		);
    	}
    	*/
    }
    Thread Starter esthergibbons

    (@esthergibbons)

    sorry for not being more clear. I would like to just use CSS as I don’t understand how to make child themes, so don’t want to mess with the php.

    Ok, try this CSS

    span.tags-links {
        display: none !important;
    }
    Thread Starter esthergibbons

    (@esthergibbons)

    That worked! Thank you so much. ??

    Good to hear, please set this topic as resolved.

    Thread Starter esthergibbons

    (@esthergibbons)

    thanks ??

    Hi Esther,
    I am using Twenty Sixteen version 4.7.3
    Please advise WHERE to copy the function above into the functions.php?
    Your reply is highly appreciated.
    Cheers from Frederick

    trustedic, you just copy and paste it into the file, I think.

    Make sure it’s not accidentally inside the brackets of another function and that’s it.

    The functions.php file is just a list of code snippets, functions, that exist in their own right. I believe.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Twenty Sixteen: remove tags from all posts’ is closed to new replies.