Adding Widgets

There are several widgets in Directories Pro that can be displayed in your theme’s widget areas, including sidebars, footers, headers and the homepage.

Available widgets

  • Directories: Directory - Listings - Displays a list of listings in a specific order and configuration.

  • Directories: Directory - Categories - Displays a list of categories in the directory with thumbnail images.

  • Directories: Directory - Locations - Displays a list of locations in the directory.

  • Directories: Directory - Related Listings - Displays a list of listings related with the current listing displayed, in a specific order and configuration.

  • Directories: Filter Form - Displays a filter form configured for listings. See Adding and Managing Filters for details on filters.

  • Directories: Display Element - Displays one of the display elements enabled for the Detailed display of a content type. See Managing and Customizing Displays for details on displays.

Highlighted widgets

Directories: Directory - Listings

The Directories: Directory - Listings widget allows you to display a list of listings by custom criteria in a specific order.

For example, to show the latest listings in your directory with thumbnails, select Newest First for Sort by and check the Show thumbnail option.

To show 10 random featured listings, enter 10 for the Number of items to show (0 for unlimited) option, select Random for Sort by and check the Show featured items only checkbox.

Directories: Filter Form

Filters can be displayed in a widget using the Directories: Filter Form widget.

Note: The widget is displayed on the directory index and single taxonomy term pages only, and the filters in the widget are always displayed in a single-column layout.

Once you have enabled the widget, make sure that filters are disabled on the directory index and single taxonomy term pages of the directory to avoid a conflict with the filters in the widget. In order to do so you will need to edit the default view configured for listings.

  1. Click Directories in the admin sidebar.

  2. Under the All Directories tab, click the gear icon in the row of the directory to edit.

  3. Under the Content Types tab, click the dropdown button in the Listing row and then click Manage Views.

  4. Click the gear icon in the row of the default view.

  5. Scroll down to FILTER SETTINGS under the View Mode Settings section.

  6. Select No for the Show filter form option.

  7. Scroll down the page and press Save Changes.

Directories: Display Element

The Directories: Display Element widget is different from other widgets in that the widget is displayed only on single content item pages, such as single listing, single category, single location pages. The purpose of the widget is to move or copy a certain part of the currently displayed content item from the main content section of the page to where the widget is displayed.

For example, you may want to show the map of the currently displayed listing in the sidebar. Here are the steps:

Before adding the widget, you will need to first add a map to the single listing page and make it accessible by the widget.

  1. Click Directories in the admin sidebar.

  2. Under the All Directories tab, click the gear icon in the row of the directory to edit.

  3. Under the Content Types tab, click the dropdown button in the Listing row and then click Manage Displays.

  4. Click the Detailed sub-tab.

  5. Scroll down the page and click the green Add Element button with a plus icon at the bottom of the page which will open a popup window.

  6. In the popup window, click the Fields tab and then click the Location element.

  7. In the General tab, select Map Renderer for the Field Renderer setting and leave other settings as-is.

  8. Click the Visibility tab.

    Select Yes for Add rendered content to global scope which will allow the Display Element widget to access the content rendered by this element.

    Optionally, select Yes for Remove rendered content from display so that the content rendered by this element is removed from the main content section of the single listing page.

  9. Click the Add Element button at the bottom of the popup window.

Now, let's add a Directories: Display Element widget:

  1. Go to Appearance -> Widgets and click the Directories: Display Element widget and press Add Widget.

  2. Enter Map for Title and select Directory - Listing - Location for Select display element, which is the element we've added to the Detailed display of listings.

  3. Click Save.

Visit the single listing page of a listing in the frontend, and you will see the map of the listing displayed in the sidebar (or wherever you placed the widget) instead of in the main content section of the page as shown below:

results matching ""

    No results matching ""