• 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

get_post_meta not working in child 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 › Design Tips and Tricks › get_post_meta not working in child theme

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 10 years, 5 months ago by NWTD.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 5, 2013 at 1:31 pm #9772
    NWTD
    Member

    I'm building a custom child theme with a custom page template to pull some information from a custom post type I've created. I've created this custom post type and several custom fields. In the dashboard, I've been able to successfully call these custom fields using get_post_meta for customizing the columns for my custom post type.

    However, when I attempt to call these custom fields to display on the front end of the site, I get nothing.

    Here's the code I'm using to attempt to display ont he front end: http://pastebin.com/dUPtyCh8

    Here's the page template I'm building: http://pastebin.com/tT5aRjQL

    Here's a link to the front end that visitors will see: http://contractorwebsiteservices.com/intheblackhorses/todays-racing-selections/

    January 5, 2013 at 3:03 pm #9789
    Bill Murray
    Member

    Make $post global and use the function genesis_get_custom_field(), as in genesis_get_custom_field( 'myfield' )


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    January 5, 2013 at 3:20 pm #9794
    NWTD
    Member

    Thanks Bill. that worked perfectly.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘get_post_meta not working in child theme’ is closed to new 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