• 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

Parsing [post_categories] shortcode?

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 › Parsing [post_categories] shortcode?

This topic is: not resolved

Tagged: .post-info, Post Categories

  • This topic has 2 replies, 2 voices, and was last updated 8 years ago by exelexys.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • August 1, 2014 at 8:44 pm #116633
    exelexys
    Member

    Would like to parse the [post_categories] shortcode to exclude certain categories.

    Can anyone suggest an approach to doing this?

    August 2, 2014 at 7:09 am #116668
    Brad Dalton
    Participant

    I think you may need to rewrite the function in genesis > lib > shorcodes > post.php Line 447 which uses get the category list unless there's a filter which there is but i don't think you can exclude categories that way.

    Doesn't look like the function genesis uses includes a parameter to exclude categories so you may need to wp_list_categories

    Might be another solution but that's all i can think of at the moment.


    Recent Client work

    August 5, 2014 at 12:18 am #117123
    exelexys
    Member

    Wanted to avoid that, and thankfully was able to by using this as inspiration to use CSS, and more specifically, an attribute selector to hide selected categories based on the partial value of the title attribute of the anchor tag:

    .categories a[title$="StringEndingAttributeValue"] {
    	display: none;
    }

    Thanks!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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

© 2022 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