Skip to content
Brandon Hubbard edited this page May 21, 2015 · 7 revisions

I already use the AgentPress Listings plugin, can I use this plugin?

Yes. This plugin can be used instead of the AgentPress Listings plugin. It uses the same post type name and custom field names (along with several new fields), so the posts you've added using AgentPress, along with the associated meta data, will remain attached to the listing post. Just be sure to deactivate AgentPress before activating WP Listings.

My theme already has a single listing template. How do I use the one provided with the plugin?

Some themes may already have a single-listing.php (and archive.php for listing archives) to display listings with the same post type name of 'listings'. Templates placed within your theme folder have precedence. To use the template(s) provided with the plugin, delete the single-listing.php and/or the archive-listing.php templates within your theme's folder (recommended to make a backup).

How can I create a custom single listing template?

Name your template file single-listing-CUSTOM-NAME.php (replace CUSTOM NAME with your own descriptive name). You can use the single-listing.php within the plugins /includes/views/ folder for a guide on how to display the post type data. You'll need to include the following block of text at the top of your custom template: /* Single Listing Template: Test Template Description: Give it a description to help identify */

How can I remove the default property status terms or property type terms?

Its possible to remove the default property status terms by using a filter in your theme or custom plugins. Here is an example for the status terms:

/* Remove Default Status Terms from WP Listings */
add_filter( 'wp_listings_default_status_terms', 'custom_default_status_terms' );
function custom_default_status_terms() {
  $status_terms = array();
  return $status_terms;
}

Here is an example for the property terms:

/* Remove Default Property Terms from WP Listings */
add_filter( 'wp_listings_default_property_type_terms', 'custom_default_property_type_terms' );
function custom_default_property_type_terms() {
  $property_type_terms = array();
  return $property_type_terms;
}

How can I get a list of listings using the WordPress JSON API?

  1. First you must install and activate Jetpack and connect it to your WordPress.com account.

  2. Make sure the JSON API module is enabled within Jetpack

  3. Now you can use the JSON API provided by WordPress.com to list properties.

Example to list all Listings:

https://public-api.wordpress.com/rest/v1.1/sites/$SITENAME/posts/?type=listing

Example on how to get all Listings with 5 Bathrooms:

https://public-api.wordpress.com/rest/v1.1/sites/$SITENAME/posts/?type=listing&meta_key=_listing_bathrooms&meta_value=5

The API is very powerful, and allows you to use listings with other websites/services. For more information on the API please visit their API Documentation page.

Have more questions?

For more FAQ's visit agentevolution.com