• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Moving Post Info

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Moving Post Info

This topic is: not resolved

Tagged: .post-info, Entry Footer, post meta

  • This topic has 3 replies, 3 voices, and was last updated 9 years, 5 months ago by gsxrgeek.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 12, 2014 at 9:17 pm #99901
    gsxrgeek
    Member

    Hi, I have created a child theme and moving the post info to the footer entry instead of the header entry.

    Well it works... except the post info still shows in the header-entry and the footer-entry on the first post entry. Its only the first one on each page, all the others are fine.

    Not sure how to fix it or what the issue is.
    //if page is home, move post info to entry footer
    add_action( 'genesis_entry_content', 'move_post_info' );
    function move_post_info() {
    if (is_home()) {
    // Remove the entry meta in the entry footer (requires HTML5 theme support)
    remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    //moves the post info to the entry footer
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    add_action( 'genesis_entry_footer', 'genesis_post_info', 9 );
    }
    }

    April 13, 2014 at 12:29 am #99906
    Brad Dalton
    Participant

    Bit hard to test as the code has been embedded in the page and turned some of the characters around which causes errors.


    Tutorials for StudioPress Themes & WooCommerce.

    April 13, 2014 at 12:37 am #99908
    Sridhar Katakam
    Participant

    Can you provide the URL of your site?

    If the requirement is to remove Post meta and move Post info from entry header to entry footer on Posts page, then the following should work (I tested it successfully):

    add_action( 'genesis_before_entry', 'reposition_entry_header' );
    function reposition_entry_header() {
    
    	if ( is_home() ) {
    
    		remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    
    		remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    		add_action( 'genesis_entry_footer', 'genesis_post_info' );
    
    	}
    
    }

    Genesis Tutorials | Follow me on Twitter

    April 13, 2014 at 7:07 am #99935
    gsxrgeek
    Member

    Sridhar, that fixed it. Not sure why my code was leaving the post info in the entry header on the first entry. Weird. Thanks!!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble