Problem: I am trying to replicate the search shown in the Real Estate reference site, with Makes / Models / Listings instead of State / City / House. The filters don't seem to be working correctly.
Solution: It looks like your post relationships use hyphens instead of underscores, so this was incorrect:
Problem: I'm trying to use Layouts, WPBakery Page Builder, and the Newspaper theme together but I'm not able to get my page templates to appear as expected.
Solution: Toolset Layouts and WPBakery should not be used together, so it's best to deactivate the Layouts plugin. The Newspaper theme doesn't work out-of-the-box with Content Templates, but you can follow the steps in our Theme Support for Content Templates document to help fix that problem.
Add this function name in Toolset > Settings > Frontend Content > Theme support for Content Templates:
Problem: I have a custom search View. I would like to hide the results until a User chooses some filter.
Solution: Use custom code to hide all search results until some filter is added.
add_filter( 'wpv_filter_query', 'drop_empty_search_query', 10, 3 );
function drop_empty_search_query( $query_args, $view_settings, $view_id ) {
$ids = array(1, 2, 3);
if (in_array($view_id, $ids)){
if (
// taxonomy filter needs to check for not '0' as well as not empty
( isset($_GET['wpv-wpcf-store-name']) && $_GET['wpv-wpcf-store-name'] != '0' )
||
// text search only needs to check for not empty
( isset($_GET['wpv_post_search']) && $_GET['wpv_post_search'] != '' )
) {
} else {
$query_args['post__in'] = array(0);
}
}
return $query_args;
}