Displaying Custom Fields, I'm sure I'm missing something…

Community Forums Forums Design Tips and Tricks Displaying Custom Fields, I'm sure I'm missing something…

This topic is: resolved

This topic contains 1 reply, has 1 voice, and was last updated by  adfy01 7 months, 4 weeks ago.

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

    adfy01
    Participant
    Post count: 7

    I’ve manage to get the inputs that users enter in the custom fields to display within the post, however it’s not displaying correctly. Here’s the code I have so far:

    add_filter('genesis_post_meta', 'post_meta_filter'); 
    function post_meta_filter($log, $volunteer) { 
    $volunteer = '<strong>Name of Volunteer Event:</strong>&nbsp;' . genesis_custom_field('event_name') . '<br /><strong>Date of Volunteer Event:</strong>&nbsp;' . genesis_custom_field('event_date') . '&nbsp;&nbsp;&nbsp;&nbsp;<strong>Amount of Volunteer Hours:</strong>&nbsp;' . genesis_custom_field('volunteer_hours');
    $log = '<div class="postmeta">' . $volunteer . '</div>';
    return $log;} 

    Website: http://bit.ly/1a9bIyE

    #83406

    adfy01
    Participant
    Post count: 7

    Figured it out:

    add_filter('genesis_post_meta', 'post_meta_filter'); 
    function post_meta_filter() { 
    echo '<strong>Name of Volunteer Event:</strong>&nbsp;' . genesis_get_custom_field('event_name') . '<br /><strong>Date of Volunteer Event:</strong>&nbsp;' . genesis_get_custom_field('event_date') . '&nbsp;&nbsp;&nbsp;&nbsp;<strong>Amount of Volunteer Hours:</strong>&nbsp;' . genesis_get_custom_field('volunteer_hours'); }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.