Hide Meta Data from Specific Categories

Community Forums Forums Design Tips and Tricks Hide Meta Data from Specific Categories

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  thesaraheffect 2 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #24806


    I’ve been trying to find a way to remove specific meta data (author, post date, # of comments, etc) from all posts in my “Services” category (and potentially others). I’ve been looking around the WordPress forum, stackexchange and here and can’t find anything.


    Bill Murray

    There are several approaches:

    1) create category templates for each category you want to customize (not the best solution if you want to make a simple customization to a lot of categories, but it provides a lot of flexibility); search the WP codex for category templates for more info.

    2) add a function that uses a conditional tag to a hook like genesis_before. Your function would say, in effect, “if the post is in these categories, remove the postmeta). Search the WP codex for more info on conditional tags.

    Below is the remove_action that will remove postmeta:

    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );

    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.



    Thanks, that’s exactly what I needed!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.