I have a CPT called Books. I can add a view to my Beaver Builder page that brings up a list of books based on the topic, e.g., Self Help, if I add that condition (Types of Book) to the view itself. However, that means making many views based on the topic of each page. Is there a way to use a more generic view (e.g., shows all books) that can accept a condition using a BB page's modules or a shortcode or something? So I would only have one view, but it can be used to bring up the appropriate list of books depending on the page topic, rather than making a bunch of very specific views.
Hello, yes custom field Query Filters and taxonomy Query Filters in Views can be configured to respond to shortcode attributes. Then to place the filtered View in your BB design, you can use a View shortcode with the attribute defined as desired for filtering. So for example if Type of Book is a taxonomy, and the term slug is "self-help", you can configure a Query Filter for the Type of Book taxonomy term, filtered by a term slug set by a shortcode attribute like "termslug". Then in the BB design, add the View in a simple Text editor widget using a shortcode like this:
[wpv-view name="your-view-slug" termslug="self-help"]
In other pages you would change self-help to match the slug of the topic you wish to display in the View. Custom field filters work similarly, and usually respond to the value or content in a custom field. The specific configuration depends on the field type and the values you define for the custom field.
Here is a screenshot showing two similar Query Filters, one for a taxonomy and another for a custom "radio" field. Each is configured to respond to a shortcode attribute in the View shortcode.
Let me know if you need additional guidance and I can help you set this up and implement the correct shortcode structure.
My issue is resolved now. Thank you!