Move Post-Info from above title to above Post-Meta in Executive

Community Forums Forums Design Tips and Tricks Move Post-Info from above title to above Post-Meta in Executive

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  asterbird 1 year, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18109

    Cleo3
    Participant
    Post count: 10

    I need to move the Post-Info (date, author) from above the post title to right above the Post-Info (categories, tags) in the Executive child theme on both the category/blog listing type pages and on the individual post pages.

    Here’s a category page on the site:

    http://horsesofthewest.com/horses-for-sale/category/all-horses-for-sale/

    Here’s an individual page:

    http://horsesofthewest.com/horses-for-sale/2012/07/docs-image/

    And here is a little screenshot/drawing of what I’m trying to do in case I didn’t explain it very well.

    https://docs.google.com/file/d/0B9KNFo2i4MtiQTJ0VHBnWDdzems/edit?usp=sharing

    Any idea how I’d do this?  Thanks!

    #18246

    asterbird
    Participant
    Post count: 101

    Try this in your theme functions.php file:

    [php]

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

    // Add post info function somewhere else
    add_action( ‘genesis_after_post’, ‘genesis_post_info’ );

    [/php]

    If it doesn’t show up at the right place, replace genesis_after_post with another hook (see http://my.studiopress.com/docs/hook-reference/ for list of available hooks.)

    Also check out http://my.studiopress.com/snippets/post-info/

    #18362

    Cleo3
    Participant
    Post count: 10

    Thanks!  This is certainly getting me closer and I appreciate your help.

    Now I have kind of a weird situation.  On blog/category/listing pages I’m getting post-info  twice above the post title and not at all below it.

    The individual post pages have it both top and bottom.

    Interestingly, your solution worked perfectly on my demo site for this site, so I’m guessing that narrows the issue down to something different between the two.  I’ll comb through the plugins to see if I might have an issue there?  I doubt my plugins are identical on the two sites.

    As I look through this functions.php file, which is mostly greek to me, I see this section and I wonder if it’s part of why I can’t get this to work?  (Although, it’s the same on both demo and live.)  What does this section do?  Should I remove it?

    /** Relocate the post info */
    remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ );
    add_action( ‘genesis_before_post_title’, ‘genesis_post_info’ );

    /** Customize the post info function */
    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter($post_info) {
    if (!is_page()) {
    $post_info = ‘
    <div class=\’date-info\’>’ .
    __(‘posted on’, ‘executive’ ) .
    ‘ [post_date format="F j, Y" before="<span class=\'date\'>" after="</span>"] ‘ .
    __(‘by’, ‘executive’ ) . ‘ [post_author_posts_link] [post_edit]
    </div>
    <div class=”comments”>
    [post_comments]
    </div>’;
    return $post_info;
    }
    }

    Thanks again – to anyone with some information.

     

     

     
    /** Relocate the post info */
    remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ );
    add_action( ‘genesis_before_post_title’, ‘genesis_post_info’ );

    /** Customize the post info function */
    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter($post_info) {
    if (!is_page()) {
    $post_info = ‘
    <div class=\’date-info\’>’ .
    __(‘posted on’, ‘executive’ ) .
    ‘ [post_date format="F j, Y" before="<span class=\'date\'>" after="</span>"] ‘ .
    __(‘by’, ‘executive’ ) . ‘ [post_author_posts_link] [post_edit]
    </div>
    <div class=”comments”>
    [post_comments]
    </div>’;
    return $post_info;
    }
    }

    #18368

    asterbird
    Participant
    Post count: 101

    Yes, that stuff is affecting it. Try commenting it all out, and see what happens on the frontend. That way, you’ve effectively deleted it, but it’s still there if you need it later as you further develop the website.

    I can’t explain what it does, because I don’t understand it all myself, but you might want to look at http://www.wpsquare.com/remove-change-post-info-genesis-theme/ to help.

    I hope someone else can chime it too, and help out. :)

    #18386

    asterbird
    Participant
    Post count: 101

    Yes, that is probably affecting it. Try putting all that code in comments, and see how it changes the frontend. Commenting it out is better than deleting, especially until you are finished developing the website.

    Hopefully some others can chime in and help, because I don’t know enough to even explain all that code. :)

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

You must be logged in to reply to this topic.