How to output the listing ID on your templates
If you want to output the listing id on your listings you can achieve this with a simple function and output it on the listing templates. Add the following code to your theme functions file or custom settings plugin like epl-filters.
This method allows you to alter the default template without the need to edit the template file directly.
Create a function to retrieve the Listing ID.
function my_custom_listing_id_callback() { global $property; $listing_id = $property->get_property_meta( 'property_unique_id' ); echo '<div class="property-unique-id">Listing ID: ' . $listing_id . '</div>'; } // Apply the function to a template hook. add_action( 'epl_property_content_before' , 'my_custom_listing_id_callback' );
Template Action Hook Names