To answer your question faster, you can search our knowledgebase articles before submitting a ticket.
How do I insert WPL shortcodes into a theme file instead of a WordPress page?
Posted by on 20 May 2022 05:32 AM

You can use WPL shortcodes inside of a PHP file such as a WordPress theme file. Use the WordPress do_shortcode() function for this. For example, when loading a Property Listing, you should insert echo do_shortcode('[wpl_property_listings]'); code into your theme file. You can use shortcode attributes in this case also.

For example, you can insert echo do_shortcode('[wpl_property_listings sf_locationtextsearch="Los Angeles, California, united States"]'); etc.

Here is how to generate WPL Shortcodes:

Comments (0)