• Resolved khairianr

    (@khairianr)


    Hello! good day
    I need to get post_id for import if meta_key=’field_id’ matched with meta_value=###
    can be implemented with shortcode and function method? I am stuck on this
    Appreciate any help i can get thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter khairianr

    (@khairianr)

    So far i got is this but does not work.

     [wpie_function custom_function="getPostID" field_id="{fieldid[1]}" ]
    
    function getPostID( $content="" ,$field_id) {        
        global $wpdb;
       
     $post_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='field_id' AND meta_value=$field_id AND post_status = 'published'" ));   
         if ( $post_id ) return $post_id;
        return null;
    }
    
    • This reply was modified 4 years ago by khairianr.
    Moderator James Huff

    (@macmanx)

    Hi there @khairianr I see you reported yourself to the moderators as a Guideline Violation. Please note that we are just the folks who enforce the rules around all of www.ads-software.com.

    Reporting to moderators doesn’t get any faster support, instead it just kind of attracts attention from folks whose radar you probably don’t want to be on. ??

    If you really do need a moderator, please add a reply letting us know why before you hit the report button.

    Otherwise, please hang in there for the plugin’s support to reply when they can.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Again:

    Hi there @khairianr I see you reported yourself to the moderators as a Guideline Violation. Please note that we are just the folks who enforce the rules around all of www.ads-software.com.

    Reporting to moderators doesn’t get any faster support, instead it just kind of attracts attention from folks whose radar you probably don’t want to be on. ??

    If you really do need a moderator, please add a reply letting us know why before you hit the report button.

    Otherwise, please hang in there for the plugin’s support to reply when they can.

    Please do not report your topic a 3rd time.

    Plugin Author vjinfotech

    (@vjinfotech)

    Hi,

    Thanks for getting in touch.

    please mail me sample file on [email protected] with your issue with details. i will provide solution in minimum time.

    let me know if you still have any questions.

    Thanks and have a nice day

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to get post_id from custom_field’ is closed to new replies.