Support

Account

Home Forums Front-end Issues Sidebar on Filtered Pages

Solving

Sidebar on Filtered Pages

  • I have a custom post type called “Listings” which lists all the properties and has the WordPress sidebar. Each property has a ACF field group to filter based on the type of property. Everything up to this point is working great. It correctly filters when I append this to the URL:

    /listings/?sale_lease=lease&property_type=industrial

    My questions is, why does the sidebar not display on these filtered pages?

    Additionally, I have a header image set to display depending on which page/archive/template is being viewed and the image disappears once I got from /listings to /listings/?sale_lease=lease&property_type=industrial

    Is there a way in WordPress to allow sidebars with widgets to be displayed on these types of pages and why might my header images not want to show up on these filtered pages?

  • Hi @infominemindmedia-com

    It’s not really an issue with ACF but I’ll try to help you.

    I’m not sure wether you’re using a page to show the listings on initially? Whenever you head to the filtered URL WordPress would load up the archive.php or archive-postslug.php file instead. Are you using taxonomies with terms to filter? Or are you filtering with some custom function or another plugin?

  • Hi, thank you for the response.

    /listings is an archive template I created which successfully displays my loop of properties, the sidebar and the header image (which is displayed if the archive page is /listings)

    Once I add the filter to the URL, it filters the properties correctly but I lose the header image and the sidebar.

    Yesterday I created a widget to display properties that are for sale and lease. Then I realized the sidebar shows up but only displays this new widget and only displays properties for the given filter (for sale or for lease).

    Does that help make more sense?

    Thanks again.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Sidebar on Filtered Pages’ is closed to new replies.