How to use wp_postmeta in visual composer

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

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

Open Support Ticket
  • Author
    Posts
  • #378835

    pavel brand
    Free User

    I have asked a question regarding using custom fields with visual composer, and received the following answer:

    “we don’t store custom fields in the wp_postmeta table, visual composer will not be able to retrieve them.”

    I would appreciate your help on how can i access them otherwise? Is there a way for me to use them in visual composer? is there a way to switch some of them to be custom fields?
    I really would like to have a bit more control over the visualization for my directory that offered by VC.

    Thank you

    I am trying to show some of the custom field of “places” in my custom loop using visual composer grid:

    https://gyazo.com/ebf8221d38c4597aef81a510e569d8c4

    I am trying to insert the address custom field into my grid of places, when entering “post_address” as field key name, nothing shows up.

    i will appreciate your assistance on the matter.

    #378865

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    as we already told you, that’s not possible with Visual Composer, unless it is modified to make it capable of retrieve GeoDirectory custom fields.

    There isn’t much that we can do to help you unfortunately.

    Programmatically they can be retrieved pretty easily because most are added to the $post variable.

    This for example would show your address:

    
    
    global $post;
    echo $post->post_address;

    this one too:

    
    
    
    $address= geodir_get_post_meta($postid,'post_address',true); 
    echo $address;

    We would appreciate if you avoided to ask the same question twice. The answer is not going to change.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 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