• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Hiding functional categories from post meta info

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Hiding functional categories from post meta info

This topic is: not resolved

Tagged: categories

  • This topic has 3 replies, 2 voices, and was last updated 12 years, 10 months ago by Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 4, 2014 at 12:54 pm #83221
    capito
    Member

    Genesis Framework, custom child theme

    I have run into the need to utilize purely functional/internal categories in order to filter my content out to my subscribers appropriately. I do not want those categories to show up on my posts on the website.

    I have found wordpress solutions for hiding a category, but they require accessing a php file that is located within the core framework, which I obviously should not edit.

    Example typical solution:
    http://codegrad.hub.ph/excluding-categories-in-wordpress-post-category-list/

    I do not have a php file in my child theme that is calling: <?php the_category(', ') ?> - which I would need to edit in order to get this solution to work.

    I am using a custom child theme that contains functions.php, page-holding.php, page-no-sidebar.php, single_featured-products.php, and the stylesheet. Built by a consultant.

    Any advice or guidance would be greatly appreciated as I cannot think of another way to send the correct content to the correct lists without the use of categories and the current set-up will result in two to three categories per post, with one to two being completely inexplicable to the reader. Open to other ideas or plugins besides using categories.

    Thanks!

    Offending categories: Mission, Universal

    http://blog.impactignition.com
    January 4, 2014 at 1:00 pm #83224
    Brad Dalton
    Participant

    Try this http://wpsites.net/web-design/exclude-category-posts-page/

    These are the category i.d's you can change to your own, comma separated with a minus before them.

    -27,-30
    

    Please copy ALL the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++


    Tutorials for StudioPress Themes.

    January 4, 2014 at 4:14 pm #83260
    capito
    Member

    Thanks, Brad. Being a newbie, forgive me if I am misinterpreting, but it looks like that code would exclude any posts with those categories from showing up on the home page, correct?

    What I need is for the post metadata that shows after each post title to not show those categories - since they are purely internal management categories and not categories that are helpful for the reader in navigating the blog.

    Ex. Why your mission needs business partners posted on Collaboration, Mission

    I used the Mission and Universal categories so that Mailchimp delivers a category-based feed to those on my list who want that type of content. Collaboration is a genuine category that the reader can use to find additional posts in that genre, but I don't want the Mission and Universal category tags to show.

    January 4, 2014 at 4:36 pm #83265
    Brad Dalton
    Participant

    Bit hard to understand your question.

    What are the exact tag or category names you want to hide?

    The code depends on whether you're using a XHTML or HTML child theme because the loop hooks have changed.

    You can do all this conditionally using the has_tag() and in_category() conditional tags.

    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    	$post_meta = '[post_categories] [post_tags]';
    	return $post_meta;
    }
    

    You need to add the conditional after the function.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble