Featured Homes
The featured homes widget comes with your Great Real Estate plugin. In addition, you can use template tags in your theme, or you can embed short codes directly in your pages or posts, to display the Featured Homes content anywhere on your site.
Note: because of the size of the resulting content, the “map” option is not currently available in the Widget, so please use the template tags or shortcodes.
Widget
This assumes you’re already familiar with widgets. If not, you’ll want to read the WordPress Docs. And if your theme is not set up for dynamic sidebars, you may choose to convert them, or jump to the end for the widget template tag documentation, and add the tag to your theme files.
Widget Activation
On the plugins page, the entry just below Great Real Estate is the widget plugin. You’ll need to activate it separately – just click “Activate”.
Adding a Widget to a Sidebar
On the widget page, click “Add” next to the Featured Listings entry. This will add one instance of the widget to your sidebar. Note that you can still add more instances, each with a different set of options. If you have a blog with multiple sidebars, topbars, and a separate widget bar on the front page, you can have as many as you like.
Choosing Widget Options
There are currently four options to configure for your Featured Homes widget.
Title
You can leave this blank if you don’t need a title, or if it is being generated outside the widget. Otherwise, try something like “Featured Homes” or “My Listings”.
Display Type
You have a choice between the two examples below. “Thumbnail list” or “Text links”.
[singlepic id="35" w="200" h="200" mode="" float="right" ]
Number of homes
If you don’t specify, the configured Max Featured Homes setting will be used. Otherwise, enter the highest number of homes you’d like to display at one time. This is great if you have something like 60 active listings.
Sort by
Again you have a choice. Likely picks for your home page might be “Random order” which will just pull a few listings out of a hat each time the page loads, or “Recently listed” which shows homes in reverse order by date listed, or “Highest price” which lists your priciest homes first. Or, you might want to promote the most affordable homes with “Lowest price“. On a sidebar on an inside page (perhaps on the sidebar of all your listings pages) you might choose “Page title order” which will sort by the page title.
Template Tags
For those of you who are adding code directly to your theme files, you’ll need to pick the options with arguments to the template tag function.
Function reference:
show_listings_featured( numberHomes, sortOrder, displayType, titleText );
Arguments
- numberHomes: integer (maximum number of homes)
- sortOrder: text string – ‘highprice’, ‘lowprice’, ‘title’, ‘random’, ‘listdate’, ’saledate’
- displayType: text string – ‘basic’ (thumbnails), ‘text’ (text links), or ‘map’ (map of all listings)
- titleText: text string – any HTML to be used as a widget title
Example:
if ( function_exists( 'show_listings_featured' ) ) {
echo show_listings_featured( 5, 'highprice', 'basic', 'Featured Listings' );
}
Shortcodes
You can embed featured listings or a map display in your blog posts or inside the page content using a shortcode.
[featured-listings max="1" sort="highprice" type="basic" head="Featured"]
will output your most expensive featured listing
[featured-listings type="map" head="All Listings"]
will output a map of all active and sold listings ie all listings appearing
in your googlemaps RSS feed
Questions
Q: How do I decide which homes to show?
A: The Featured Homes widget only uses the listings that you have checked as “Featured” on the listing edit page for the “basic” and “text” displays. For the “map” display, only the homes in your googlemaps feed are used – edit the logic in that file to control which listings are published; by default all your listings, including sold properties, are in the googlemaps feed.
Q: No homes are showing up in my maps display. What’s wrong?
A: You might not have set up the Googlemaps feed. See the setting up syndication overview. Check that you see valid XML at http://yoursite.com/feed/googlemaps