Hide certain tags in post meta

Community Forums Forums Design Tips and Tricks Hide certain tags in post meta

This topic is: not resolved

Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by  braddalton 1 year, 3 months ago.

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


    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.



    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 )
    	if ( genesis_html5() )
    		$output = sprintf( '<span %s>', genesis_attr( 'entry-tags' ) ) . $tags . '</span>';
    		$output = '<span class="tags">' . $tags . '</span>';
    	return apply_filters( 'genesis_post_tags_shortcode', $output, $atts );



    You may need to replace get_the_tag_list with a new WP_Query

    $args = array(
        'post_type' => 'post',
        'tax_query' => 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 );

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

You must be logged in to reply to this topic.