custom fields in BackCountry theme

Community Forums Forums Design Tips and Tricks custom fields in BackCountry theme

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  SoZo 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12654

    HollyKnott
    Participant
    Post count: 3

    I’m new to Custom Fields and am using the plug-in Advanced Custom Fields. I’m stumped as to how to now call those custom fields into a unique post. The Backcountry child theme doesn’t have a file called single.php that I can modify. I found one in a Genesis folder that I thought I’d copy into the child theme folder as a basis, but it only contains this code:

    genesis();

    In which file should the PHP be entered? Or would I use Genesis Custom Hooks? Seems it’s as simple as adding something like:

    <?php echo get_post_meta($post->ID, "Camera_Specs", true); ?>

    but where… ?
    Thanks for any tips.

    #12669

    SoZo
    Moderator
    Post count: 1573

    You need to call it through a function added to functions.php with an action hook and conditional tag e.g.

    add_action(genesis_after_post, camera_specs);
    function camera_specs() {
    if( is_single() )
    echo get_post_meta( $post->ID,”Camera_Specs”, true);
    }


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

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

You must be logged in to reply to this topic.