This code enables you to display listings by taxonomy and term in any sidebar widget area. The code includes a shortcode you simply copy & paste into your editor or any text widget in any widget area.
Here’s an example showing the last 4 listings in the price taxonomy for the 100k-250k term
Usage With Other Taxonomies & Terms
Simply change the value for the taxonomy and term parameters in the code to any other taxonomy or term.
Example which displays listings from the status taxonomy with the sold term.
Usage With Other Custom Post Types
Simply change the value for the post type parameter from listing to the name of your CPT.
- Copy and paste all the PHP code to the end of your child themes functions file.
- Paste the shortcode [tax_terms] into a text widget in any type of sidebar or widget area.
Here’s the code for logged in members: