rep__get_listing_post_id()
This function, retrieves a post ID based on a Listing ID from the database and returns it as data.
Namespace
REP_Malcolm
Return
data
Listing post ID data.
Source
File: \includes\rep-helper-functions.php
function rep__get_listing_post_id( $listing_id ){
global $wpdb;
$post_id = $wpdb->get_var(
$wpdb->prepare( "SELECT post_id FROM {$wpdb->prefix}rep_listing WHERE listing_id=%d", $listing_id )
);
return $post_id;
}