How to Create Custom Pages to Display Listings for a Specific Category in eDirectory
Introduction
Custom pages for specific listing categories in eDirectory are a great way to offer tailored content and improve navigation on your site. Whether you want to highlight a particular type of business or service—such as restaurants, shops, or services—this feature enables you to do so effectively. In this guide, we will walk you through the process of creating a custom page that showcases listings from a specific category, like "Restaurants." You can easily apply the same steps to other categories as well.
Step-by-Step Guide
Step 1: Create a Category
Before you start creating your custom page, ensure that the desired category is set up in your eDirectory system.
- Go to Content → Listings → Categories.
- Click Create Category and create the category you want to feature. For this example, we’ll create the category “Restaurant.”
Step 2: Access the Page Editor
Once your category is ready, it's time to build the page that will display listings within that category.
- Navigate to Design → Page Editor.
- Click on Add New Page to begin creating a custom page.
Step 3: Name Your Custom Page
On the new page:
- Choose a name for your custom page. In this case, we’ll call it "Restaurants," but you can name it according to the category you wish to feature, like "Shops" or "Services."
Step 4: Add a Widget to Display Listings
Now that your page is created, you need to add a widget to display the listings from your chosen category.
- Click on Add Widget on your new page.
- Scroll through the widget options and select Listings & Cards.
- Choose the Vertical Cards Widget to display your listings.
Step 5: Configure the Widget for Your Category
After adding the widget, configure it to display only the listings from your desired category.
- Enter the Widget Title (e.g., "Restaurants").
- Select the module from which the widget will pull content, such as Listings.
- Choose the number of Columns for the widget.
- Select Customize rules to adjust the display settings.
- Under From which product would you like to display these items, check the listing levels you want to display.
- Set Items displayed to specify how many listings to show.
- Choose criteria for ordering the results.
- Make sure to set the category filter to display only listings from the "Restaurant" category.
By configuring the category filter to "Restaurant," only listings from this category will appear on the page.
Step 6: Save Your Changes
Once you’ve configured everything:
- Click Save Changes at the top of the page to publish your custom category page.
Note: If you receive a "Slug URL already in use, please choose another slug" error when saving the page in the top right corner, it means the URL assigned to the page is already being used by a category.
Since URLs in eDirectory must be unique, the system will not allow you to save the page with a duplicate URL. To resolve this, you’ll need to modify the page URL slightly to make it unique. One simple solution is to add an extra character, such as a dash ( - ), to the link, and save changes. For example:
Step 7: Link the Page to the Header Menu
After saving your page, you may want to add it to your site’s header menu for easier navigation.
- Stay within the Page Editor.
- Find the Header Widget and click to edit it.
- Click the + button to add a new link.
- Click the Gear Icon next to the new menu item.
- Enter a name for the option in the Page Title field, such as "Restaurants."
- Select your newly created page ("Restaurants") in the dropdown menu.
- Save the changes to the header menu.
- Finally, click Save Changes in the top-right corner of the page to apply your updates.
Note: If you don’t see the + button and instead see a page, your site likely uses the Dropdown Menu plugin.
To link your page to the header menu with this plugin:
- Go to Design → Navigation Menu in your site settings.
- Configure the Dropdown Menu to include your new page.
For a guide on setting up and managing the Dropdown Menu, refer to this article: Dropdown Menu.
Conclusion
You’ve successfully created a custom page that showcases listings from a specific category and linked it to your site’s navigation menu. In our example, we created a "Restaurants" page that displays only restaurant listings, but you can easily apply these steps to any other category.
Feel free to further customize the page by experimenting with different widgets and layouts to align with your directory’s style and branding!