Move post info after excerpt

Community Forums Forums Design Tips and Tricks Move post info after excerpt

This topic is: not resolved

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  cdils 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13551

    dgiuliana
    Participant

    I am using the Lifestyle theme. On my home page, I want the post info (date, comments, categories) to show AFTER the excerpt instead of before it. And can this be done independent of how they show on post pages?

     

    Thanks in advance.

    #13894

    cdils
    Participant
    Post count: 421

    Maybe try something like this…

    /** Remove the post info function */
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );

    And then add it back in with the post meta…

    /** Add the post info function */
    add_action( 'genesis_after_post_content', 'genesis_post_info', 5 );

    Side note…the 5 at the end of the function should position the post info before the post excerpt.

    Now if you want this to happen on the home page ONLY and not on the others, we can wrap the above code in a conditional, like this:

    /** Customize location of post info function */

    remove_action( 'genesis_before_post_content', 'genesis_post_info' );

    add_action( 'genesis_after_post_content', 'lifestyle_custom_post_info' );
    function lifestyle_custom_post_info() {
       if ( is_home() || is_front_page() ) {

         genesis_post_info();

       }
    }

    I didn’t test the code, so proceed with caution, but I think that’s the idea!

    Cheers,
    Carrie


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I host a weekly Genesis-focused podcast called Genesis Office Hours. I tweet @cdils.

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

You must be logged in to reply to this topic.