WpDatatables – cannot find GD custom fields

This topic contains 1 reply, has 2 voices, and was last updated by  Stiofan O’Connor 8 years, 1 month ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #390001

    opholdings
    Free User

    HI GD.

    I would like to use with WpDatatables. The Jquery Datatables plugin. The plugin creates a table from wordpress posts. But one problem. I cannot find the custom GD fields. For example, in the CPT NETWORK i have a custom field called TEST. Here is the generated mysql output from Datatables. Can you show me how to add the GD custom fields to the mysql query?

    SELECT LEFT( posts_gd_network.post_content, 100) AS gd_network_post_content_limited_100_chars,
    posts_gd_network.post_name AS gd_network_post_name,
    gd_network_taxonomy_gd_networkcategory_tbl.name AS gd_network_taxonomy_gd_networkcategory
    FROM am_posts AS posts_gd_network
    INNER JOIN (SELECT name, object_id as id FROM am_terms AS gd_network_taxonomy_gd_networkcategory_tbl_terms INNER JOIN am_term_taxonomy AS gd_network_taxonomy_gd_networkcategory_tbl_termtaxonomy ON gd_network_taxonomy_gd_networkcategory_tbl_termtaxonomy.term_id = gd_network_taxonomy_gd_networkcategory_tbl_terms.term_id AND gd_network_taxonomy_gd_networkcategory_tbl_termtaxonomy.taxonomy = ‘gd_networkcategory’ INNER JOIN am_term_relationships AS rel_gd_network_taxonomy_gd_networkcategory_tbl ON gd_network_taxonomy_gd_networkcategory_tbl_termtaxonomy.term_taxonomy_id = rel_gd_network_taxonomy_gd_networkcategory_tbl.term_taxonomy_id) AS gd_network_taxonomy_gd_networkcategory_tbl
    ON gd_network_taxonomy_gd_networkcategory_tbl.ID = posts_gd_network.id
    WHERE 1=1
    AND posts_gd_network.post_type = ‘gd_network’

    #390067

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    I’m not sure where you are getting that query from but you would need to join the GD details table like

    $wpdb->prefix . "geodir_" . $post_type . "_detail"

    Let me know if you need more advice.

    Thanks,

    Stiofan

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