Hide listing cards from a specific category until that category is selected in the filter

Hi!

How can I make it so that, until a specific category is selected in the top filter, the product cards from that category are not displayed in the list of product cards below?

Could you please advise?

Is it possible to achieve this with custom code?

Is it possible to achieve this with code?

Hi,

Please navigate to HivePress > Settings > Listings > and enable the Display categories instead of listings feature. Then the user will need to first select a category before searching.

​I hope this is helpful to you

Hi!

Thank you for your response.

Is there a way to implement what I need directly in the code?

Or could you tell me where the query for fetching posts on the homepage is being formed, specifically the query arguments? I think I could add the logic I need in that place.

Hi,

Please note that this feature works exactly as you describe, i.e. no listings will be shown until you select a category. Please try to enable it and test the functionality.

Thank you for your response.
1. I need all listings to be displayed on the homepage, except for listings from a specific category.
2. Only when I select this specific category in the filter at the top should listings from this category be displayed, while all other listings should be hidden (this part is already working - point 2).

On the homepage, I display listings using the shortcode [wre_archive_listings].

Hi,

I see. Please note that the shortcode you wrote is not our plugin but WP Real Estate – WordPress plugin | WordPress.org. I recommend you contact their support.

Thanks

I checked, and that plugin is not installed on the site.

Here is the list of plugins installed on the site:
• Advanced Custom Fields PRO
• All-in-One WP Migration
• Clearfy Pro
• Code Snippets
• Core Rollback
• Cyr-To-Lat
• Elementor
• Elementor Pro
• Elementor Pro Form Widget - Bitrix24 CRM - Integration
• HandL UTM Grabber
• HivePress
• HivePress Blocks
• HivePress Bookings
• HivePress Claim Listings
• HivePress Favorites
• HivePress Geolocation
• HivePress Import
• HivePress Memberships
• HivePress Messages
• HivePress Paid Listings
• HivePress Reviews
• HivePress Search Alerts
• HivePress Social Links
• HivePress Social Login
• HivePress Statistics
• HivePress Tags
• iframe
• Image Watermark
• Jetpack Protect
• Kama SpamBlock
• One Click Demo Import
• Query Monitor
• Safe SVG
• URL Rotator Manager
• WP Super Cache
• WP Telegram
• WPForms Lite
• Yoast SEO
• Zapier for WordPress

Hi,

There is no feature in the Listings block that shows all categories except excluded. There is a choice of which category to show, but we will try to add more options in the next updates. “On the homepage, I display listings using the shortcode [wre_archive_listings]” - if you use this shortcode and it shows listings, then HivePress does not have such a shortcode, and an Internet search for this shortcode showed that it is the WP Real Estate plugin.

P.S. Your request is related to a premium product. Please add the license key to the account settings to access forums for your purchased products and get the Premium Support badge on your profile. If the support for your purchase has expired, please consider renewing it for assistance: Renew Support | HivePress

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.