• I need to show the Listing Agent on the listing single in accordance with Oklahoma law. I fixed it for my self by adding this line to /add-ons/listings/includes/class-listing-import.php:311

    update_post_meta( $id, '_listing_listing_agent_id', isset( $idx_featured_listing_data['listingAgentID'] ) ? $idx_featured_listing_data['listingAgentID'] : '' );

    I am then able to query for the employee post to get the title:

    $employees = get_posts(
    	array(
    		'numberposts' => 1,
    		'post_type'   => 'employee',
    		'meta_key'    => '_employee_listingagentid',
    		'meta_value'  => get_post_meta( get_the_ID(), '_listing_listing_agent_id', true ),
    		'post_status' => 'publish',
    	)
    );
    

    You would, of course need to add this to your default display of a listing. I didn’t have to because I have a custom single-listing.php in my theme.

    If there is a better way to get this info, please let me know but as I saw it, on import this data wasn’t being pulled in.

The topic ‘Feature Request: Pull in Listing Agent’ is closed to new replies.