get_post_meta not working in child theme

Community Forums Forums Design Tips and Tricks get_post_meta not working in child theme

This topic is: resolved

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9772

    NWTD
    Participant
    Post count: 61

    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/

    #9789

    Bill Murray
    Participant
    Post count: 575

    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.

    #9794

    NWTD
    Participant
    Post count: 61

    Thanks Bill. that worked perfectly.

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

The topic ‘get_post_meta not working in child theme’ is closed to new replies.