How do I get the value of a custom field programatically

This topic contains 3 replies, has 2 voices, and was last updated by  Simone 10 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #24922
    #24924

    Simone
    Expired Member
    Post count: 3515

    hi,
    you should use

    geodir_get_post_meta($postid,'geodir_instagram',true);

    first set your $postid, e.g. with

    
    
    
    global $wp_query;
    
    $postid = $wp_query->post->ID;
    
    #24926

    nitefader
    Expired Member
    Post count: 86

    Thanks Simone!

    I just discovered this as well, please let me know if this is a bad approach==>

    $post_details = geodir_get_post_info($entry[‘ID’]);
    // print_r($post_details);
    $replace=’**** ‘. $post_details->geodir_instagram . ‘ ***’;

    Thanks this is resolved for me!

    #24929

    Simone
    Expired Member
    Post count: 3515

    this could be another approach 🙂
    glad you sorted out

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount