Remove the Post Tags from Excerpt only?

Community Forums Forums Design Tips and Tricks Remove the Post Tags from Excerpt only?

This topic is: not resolved

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

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

    Gemma Wild
    Participant

    Hey guys

    Does anyone know of a way to remove the post tags from the excerpt only?

    I found the function that can remove the ‘post meta’ but unfortunately this also removes it from the actual post itself, which is not what I’m looking to do. I want to remove it just from the excerpt.


    /** Remove the post meta function */
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );

    Thanks
    Gem


    While this town is busy sleeping…

    http://www.gemmawild.co.uk

    #6889

    Hard Boiled Greg
    Participant
    Post count: 88

    Paste this into functions.php:

    add_action( 'genesis_before', 'excerpt_post_meta_removal' );
    function excerpt_post_meta_removal() {
    if( !is_single() ) {
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    }
    }

     

    HBG


    Website: Hard Boiled Greg Twitter: @hbgreg

    #7154

    Gemma Wild
    Participant

    Greg, thank you so much, this worked a treat!


    While this town is busy sleeping…

    http://www.gemmawild.co.uk

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

The topic ‘Remove the Post Tags from Excerpt only?’ is closed to new replies.