• 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

Hide certain tags in post meta

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 › Hide certain tags in post meta

This topic is: not resolved

Tagged: post meta, tags

  • This topic has 2 replies, 2 voices, and was last updated 12 years ago by Brad Dalton.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • August 7, 2014 at 4:05 pm #117657
    Jummul
    Member

    Hi there!

    As you can see on the site in question (www.acupoflife.nl) there is a blog containing posts labeled with tags. These tags serve two purposes; first they tell the visitor what the post is about and give the visitor the option to click the tag so they can view more alike posts.

    Secondly, they are used in a php-script to order all the post in our archive (click on any of the categories above if you will). A post containing a tag that is linked to an archive will automatically be listed there.

    Now, the qu

    I stopped typing. Question: How can I hide certain tags from post meta. I want (need) to tag posts with a certain number of tags but want to be able to control what tags I show the audience.

    http://acupoflife.nl
    August 7, 2014 at 8:14 pm #117691
    Brad Dalton
    Participant

    You can modify the WordPress function which generates them in Genesis. ( Please do this in a child theme )

    add_shortcode( 'post_tags', 'genesis_post_tags_shortcode' );
    
    function genesis_post_tags_shortcode( $atts ) {
    
    	$defaults = array(
    		'after'  => '',
    		'before' => __( 'Tagged With: ', 'genesis' ),
    		'sep'    => ', ',
    	);
    	$atts = shortcode_atts( $defaults, $atts, 'post_tags' );
    
    	$tags = get_the_tag_list( $atts['before'], trim( $atts['sep'] ) . ' ', $atts['after'] );
    
    	//* Do nothing if no tags
    	if ( ! $tags )
    		return;
    
    	if ( genesis_html5() )
    		$output = sprintf( '<span %s>', genesis_attr( 'entry-tags' ) ) . $tags . '</span>';
    	else
    		$output = '<span class="tags">' . $tags . '</span>';
    
    	return apply_filters( 'genesis_post_tags_shortcode', $output, $atts );
    
    }
    

    Tutorials for StudioPress Themes.

    August 8, 2014 at 12:54 am #117729
    Brad Dalton
    Participant

    You may need to replace get_the_tag_list with a new WP_Query

    $args = array(
        'post_type' => 'post',
        'tax_query' => array(
            array(
                'taxonomy' => 'post_tag',
                'field' => 'id',
                'terms' => array( add comma seperated list of tag I.D's here ), 
                'operator' => 'NOT IN'
            )
        )
    );
    $query = new WP_Query( $args );
    
    

    Tutorials for StudioPress Themes.

  • 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

© 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