Remove Post Meta from Excerpts

Community Forums Forums Design Tips and Tricks Remove Post Meta from Excerpts

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  SoZo 1 year, 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #15744

    ellenstevens
    Participant
    Post count: 32

    USING PROSE.

    How do I remove post meta from excerpts only?  I want it to appear on full posts.

    Ideas?

    #15755

    SoZo
    Moderator
    Post count: 1573

    You would need to add the remove action to the custom code panel through a function which includes a conditional tag. You could also use the Genesis Simple Hooks plugin, unhook post-meta and then place your output wrapped in a conditional statement.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #15802

    ellenstevens
    Participant
    Post count: 32

    Okay.  So, I’ve read through these guides, but I’m fairly new to WP and I can’t seem to get it straight.  Can you explain it in layman’s terms?  :)

    #15804

    SoZo
    Moderator
    Post count: 1573

    The function would go something like
    [php]add_action(‘get_header’, ‘remove_meta’);
    function remove_meta() {
    if( ! is_single() ) {
    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
    }}[/php]


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #15845

    ellenstevens
    Participant
    Post count: 32

    That’s perfect!  I think I had the IF selection.  Thanks for helping me with this.  I’m slowly getting it!

     

    ellen

    #15846

    SoZo
    Moderator
    Post count: 1573

    You’re welcome :)


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

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

The topic ‘Remove Post Meta from Excerpts’ is closed to new replies.