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

    Hello,

    I am trying to display custom fields but not sure if the coding is right because they are not showing.
    I am using the blog grid view and I believe I have to edit the postslider.php file.

    I tried adding this code to around line 286 where the rest of them are listed
    $stuffprice = get_post_meta($post->ID, 'wpcf-stuff_price', true);

    Then I added this to try display it:
    $output .= "<div class='metaprice'>".$stuffprice."</div>";

    Please let me know where I did it wrong?

    #357399

    Hi alvinhy!

    Thank you for using Enfold.

    Try replacing the code:

    $stuffprice = get_post_meta($post->ID, 'wpcf-stuff_price', true);
    

    with this:

    $stuffprice = get_post_meta($the_id, 'wpcf-stuff_price', true);
    

    Best regards,
    Ismael

    #357496

    Alright! It works!

    Thanks for the great support as always.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Display custom fields’ is closed to new replies.