Control Which AgentPress Listings Display in Widget & Archive

This code enables you to control which listings display both on your listings archive pages and the listings widget area.

The code is tested using the AgentPress Pro child theme by StudioPress which includes the listings archive.php page and also uses the listings plugin.

This tutorial is written in response to this question by a member of this site:

I want to control which listings appear in the Home – Top Widget Area here. As it is now, the last listings that were created are displayed.

This example excludes listing 2 with a post i.d of 729 from the listings widget and listings archive:

exclude-listing

Here’s the code:

Related Tutorials

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.