• 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

Custom fields don´t work in Aspire Pro Theme

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 › Custom fields don´t work in Aspire Pro Theme

This topic is: not resolved

Tagged: aspire pro, Custom fields, get_post_meta

  • This topic has 9 replies, 2 voices, and was last updated 7 years, 5 months ago by mmedia.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • February 1, 2018 at 5:22 am #215955
    mmedia
    Participant

    Hi,

    I am helping a friend with his website, he uses Aspire Pro and I realize that the custom fields don´t work in the posts. I put the php code and nothing appears:

    <?php echo get_post_meta($post->ID, 'mykey', true); ?>

    I use Simple Hooks plugin to insert the code in the post and I check the box to enable php in the field.

    Anybody else with same problem?

    Thanks.
    Marcos

    February 1, 2018 at 6:47 am #215958
    Brad Dalton
    Participant

    Try this code in your functions file.


    Tutorials for StudioPress Themes.

    February 1, 2018 at 7:58 am #215965
    mmedia
    Participant

    Thanks Braddalton, it works but I want my custom field appear under the title of the post, before the content.

    It is possible?

    February 1, 2018 at 8:08 am #215967
    Brad Dalton
    Participant

    You can use any hook

    In your case, try the genesis_entry_header with a 3rd parameter of 25 or genesis_entry_content hook with a 3rd parameter of 5


    Tutorials for StudioPress Themes.

    February 1, 2018 at 8:51 am #215974
    mmedia
    Participant

    Sorry, I don´t know what do you mean with "3rd parameter of 25" or "3rd parameter of 5"

    Could you share the code? I am a bit newbie with WordPress.

    February 1, 2018 at 9:08 am #215976
    Brad Dalton
    Participant

    This article explains the 3rd parameter


    Tutorials for StudioPress Themes.

    February 1, 2018 at 9:25 am #215977
    mmedia
    Participant

    Ok, I have tried with genesis_entry_header and it doesn´t appear under the post title:

    Los 10 mejores pulsómetros de 2024

    Is the code right?

    function genesis_entry_header() {
        echo '<div class="after-header">Add Content After Your Header Here</div>';
    };
    add_action('genesis_after_header', 'genesis_entry_header', 25 );
    February 1, 2018 at 9:57 am #215979
    Brad Dalton
    Participant

    No, use this code and change the hook


    Tutorials for StudioPress Themes.

    February 1, 2018 at 11:01 am #215986
    mmedia
    Participant

    No, doesn´t work anyway

    add_action( 'loop_start', 'genesis_entry_header' );
    function genesis_entry_header() {
    if ( is_singular( 'post') ) {
    $cf = get_post_meta( get_the_ID(), 'valoracion', true );
    if( ! empty( $cf ) ) {
    echo '<div class="before-content">'. $cf .'</div>';
        }
      }
    }

    It still appears over the title.

    February 1, 2018 at 11:10 am #215990
    mmedia
    Participant

    I have also tried genesis_before_entry_content hook.

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