Views plugin lets you build your own custom search for any content type. These searches can be based on post content, taxonomies and custom fields.
When you ask for help or report issues, make sure to tell us settings for your custom search.
Viewing 15 topics - 646 through 660 (of 751 total)
Problem: I have a custom search View that contains several filters. I would like to display the filters in the left column of the page, and results in the right column of the page.
Solution: If you are designing this View in the Block Editor, you may find the following course lesson helpful.
There is a video with more details showing how you can move the filters and results into a two-column design, side-by-side.
Problem:
The user has some post with a start and end datetime, on the same day, and he would like to filter the view by dates.
Solution:
The filter shortcode can take a values and dispaly_values arguments. Then we'll need custom code hook into the view and change its query filter.
Problem:
We have two related CPTs - Resources & Resource Items (1 Resource - many Items). Each individual Item has a select field to indicate an associated language.
We present users with a Resources page where they can search on various aspects of Resources and would like to add the ability to search for Resources according to which languages they are associated with via their related Resource Items.
Solution:
Currently, Toolset does not allow to filter a custom post type by custom fields on a related post type. This feature is on our list and will be added in the future, but we still don't know when.
It is worth mentioning that this can be implemented with custom code. It will need custom code to build the filter and another custom code that can use the toolset_get_related_posts function and hook into the view's wpv_filter_query query filter.
Problem: I would like to display a list of custom search tag filters as formatted text links. When a User clicks one of the text links, the search results in the View should update.
Solution: Use the "radio" input type and apply custom CSS to hide the radio button and apply styles to each label element to achieve the text link "pill" effect.
Problem: I have a map that displays markers from a View that displays results from two different custom post types. I would like to be able to always display all results from custom post type A, but allow the User to apply front-end filters to filter custom post type B.
Solution:
This is possible using two separate Views, with some limitations.
- Since you already have one View set up with custom search filters, you should uncheck the Content Selection checkbox for the Monuments post type in this View. This View should only include Restaurant posts in the Content Selection.
- Create a separate View that shows all Monument posts. Insert map marker shortcodes in this View, but do not insert another map shortcode. Set the map_id attribute in these marker shortcodes to point to the same map_id from the original view.
- Insert the Monuments View in the same template or post as the original Restaurants View.
- I see a Distance filter at the top of the page. If you plan to filter both Monuments and Results using the same Distance filter, you must apply an identical Distance Query Filter in the Monuments View as well. You can hide the duplicate front-end distance filter in this View by commenting out the wpv-filter-meta-html shortcode in the Output Editor of the Monuments View.
- AJAX updates are not be fully supported when two separate Views are used on the same page. A submit button with page refresh is required to load both sets of results on the same map.
Problem:
The user would like to display results of a view, grouped by a custom field.
Solution:
This use case is not supported out of the box by Toolset. Because the view loops over a list of Posts, and you are trying to loop over a list(Inspirations) of lists(Posts). But, this can be achieved with some custom PHP code.