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 - 2,476 through 2,490 (of 2,504 total)
Problem: I would like to change the text "No results found" and remove the pagination buttons from my View.
Solution: You can change the "No results found" text in the View editor's Loop Output area. You can modify pagination settings and remove pagination controls from the Filter Editor area.
Problem: I created a View of results filtered by post relationship. When this View is shown on the site, all results are shown until someone selects a filter. I would like to only show results that belong to a specific grandparent.
Solution: You can use a URL parameter to predefine a grandparent post ID, or you can add some custom code that hides all results until at least one filter is selected. Here is that custom code:
add_filter( 'wpv_filter_query_post_process', 'drop_empty_search_query_post_process', 10, 3 );
function drop_empty_search_query_post_process( $query, $view_settings, $view_id ) {
$ids = array(1234,5678);
if (in_array($view_id, $ids)){
if (
// taxonomy filter needs to check for not '0' as well as not empty
( isset($_GET['wpv-relationship-filter-fr-region']) && $_GET['wpv-relationship-filter-fr-region'] != '0' )
||
// taxonomy filter needs to check for not '0' as well as not empty
( isset($_GET['wpv-relationship-filter-int-country']) && $_GET['wpv-relationship-filter-int-country'] != '0' )
) {
} else {
$query->posts = array();
$query->found_posts = 0;
$query->post_count = 0;
}
}
return $query;
}
Replace 1234,5678 with a comma-separated list of Views where you want to apply this custom filter.
Problem:
How can I ensure to require at least one option to be selected in a Custom Filter Search on the Front End?
Solution:
What you can do, is use Custom JS for example and show the entire results only if the user actually checked at least one box.
It's not possible within Toolset using native functions.
Problem:
How to add a Custom Filter by Author in Views?
Solution:
Toolset Post Views cannot have Custom Filters for Post authors.
Only Query Filters are allowed on this parameter.
To Create a Custom Filter where the user can choose from the front end the Author of a Post so to filter the list by this value, you need to create a Custom Field or taxonomy and update your Posts with this new values.
As an example you could create a Custom Field (single line text field) where the author name can be entered on each post.
Then, by this, you can have a Custom Front-end Filter.
There is a request filed to allow the Front End searching by Authors, but this is not implemented yet.
Problem:
A View with custom search filters updating via ajax includes output in collapsible accordions, but the open/close state of the accordions is reset every time a filter is updated.
Problem:
How to change the view's purpose usage after set it to display all result
Solution:
You can always change the view purpose later on and to change it:
- Click on "Screen Options" button at top right corner of your page
- Select your desired option from the drop-down select "View purpose".
Problem: I am including a Map View inside a collapsed element (using Bootstrap Collapse). When the collapsed element is shown, the Map does not appear.
Solution: Add a JavaScript event handler that reloads the Map when the collapsed element is shown. Wrap your code in a jQuery document ready handler: