• 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

Alternative option on genesis_entry_footer Simple Hook

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 › Alternative option on genesis_entry_footer Simple Hook

This topic is: not resolved

Tagged: Entry Footer, entry-meta, is_front_page, shortcode

  • This topic has 8 replies, 3 voices, and was last updated 8 years, 11 months ago by riseUp.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • July 20, 2016 at 8:17 pm #189875
    riseUp
    Member

    Hello community,

    I will do my best to explain the situation on the struggle that I'm experiencing.

    My website is http://www.ymphony.com. When you go to the homepage, you will notice multiple posts by different users. You will see a Title and Description. Underneath the Description, notice the horizontal line and Location field.

    I have been attempting to add short code, [frm-field-value field_id=145 user_id="[q38d7 show=ID]"] into the genesis_entry_footer simple hook as the horizontal line and Location label is on the genesis_entry_footer hook. When I add the above shortcode into this hook, it does not work since it seems as though the simple hook page does not recognize this kind of shortcode.

    However, when I placed the short code on the body of the page, it worked - it showed the City of the post submitter. Basically, the short code works fine...it's just that the short code does not work on the simple hook.

    Question: is there a piece of recommended code that I can use to add onto the function.php page to allow the short code to be placed on the body of the page to avoid using the genesis_entry_footer simple hook? If I am able to place the short code onto the body of the page and have the output of the short code to display on the homepage (for each post), this would help me.

    Please advise? Thank you.

    http://www.ymphony.com
    July 21, 2016 at 1:59 am #189886
    Brad Dalton
    Participant

    1. You can use the is_front_page() conditional tag with a genesis hook in a custom function. The genesis_entry_footer hook is ideal.

    or

    2. Add the shortcode to the entry footer entry meta filter adding the is_front_page conditional tag.


    Tutorials for StudioPress Themes.

    July 21, 2016 at 5:31 am #189896
    riseUp
    Member

    Hi @BradDalton, thank you for your response.

    I was looking at option 2....how does this look?

    //* Customize the entry meta in the entry footer (requires HTML5 theme support)
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    $post_meta = '[post_categories] [post_tags]';
    return $post_meta;

    if ( is_front_page() ) {
    echo do_shortcode('[frm-field-value field_id=145 user_id="[q38d7 show=ID]"]');
    }
    }

    Do I put this piece of code within the genesis_entry_footer hook area or place this in functions.php? I tried both but the horizontal line and Location: field is not displaying on each post (bottom of post) on the homepage. Thank you.

    Moses

    July 21, 2016 at 10:47 am #189885
    Brad Dalton
    Participant

    1. You can use the is_front_page() conditional tag with a genesis hook in a custom function. The genesis_entry_footer hook is ideal.

    or

    2. Add the shortcode to the entry footer entry meta filter adding the is_front_page conditional tag.


    Tutorials for StudioPress Themes.

    July 21, 2016 at 11:26 am #189933
    Genesis Developer
    Member

    Try it:

    
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
      $post_meta = '[post_categories] [post_tags]';
      
      if ( is_front_page() ) {
        $post_meta .= '[frm-field-value field_id=145 user_id="[q38d7 show=ID]"]';
      }
      
      return $post_meta;
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    July 21, 2016 at 4:47 pm #189970
    riseUp
    Member

    Hi Genesis Developer,

    When I copied and pasted your code to my functions.php, it didn't work. The horizontal line and location field did not display on the homepage for each post. Any other thoughts? Thank you.

    July 21, 2016 at 9:18 pm #189984
    Genesis Developer
    Member

    Replace

    if ( is_front_page() ) {

    WITH

    if ( is_home() ) {

    And test once.


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    July 21, 2016 at 9:23 pm #189985
    riseUp
    Member

    Hello everybody.

    Here is the latest. I added the following shortcode into the genesis_entry_footer hook....and the City was able to be displayed at the bottom of each post on the homepage. However, user [email protected] indicated Albia as the city but the homepage post for [email protected] lists Beaverton. It looks as if the following code in the genesis_entry_footer hook displays mike smith23's city selection.

    <?php if( is_front_page() ) { ?>
    [frm-field-value field_id= 145 user_id="[95 show=ID]
    <?php } ?>

    Can somebody advise on how I can tweak the above php code to ensure that the city that a user selects displays that city for his/her post and not to be included in another user's post? Thank you.

    July 21, 2016 at 10:08 pm #189988
    riseUp
    Member

    All,

    The City displayed for joyeagles7890 is Albia. Albia is showing correctly at the bottom of the post. The issue I'm still having is that Albia is not showing on the homepage for the post.

    Mike Smith 23 is Beaverton which is right on the bottom of the post. However, the issue I'm having is that Beaverton is not showing on the homepage for the post.

    I have tried this:

    <?php if( is_home() ) { ?>
    [frm-field-value field_id= 145 user_id="[95 show=ID]
    <?php } ?>

    But I may need a tweak to allow the City result to be displayed on the homepage.

    Thank you for your assistance.

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 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

© 2025 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