Tell us what you are trying to do?
When you "filter" results, there should be some "no results" code that runs. Right now there are no available apartments so that code should run every time. When we added a few Apartments for testing, the "No results" message will only show if there is a value for Locations, Bedrooms and Availability. When you keep them at "All", it will not show the "no results" message.
Is there any documentation that you are following?
Not that I can find.
Is there a similar example that we can see?
If you click "Filter", the "no results" message will not show. If you click on "Available Apartments -> Available Next Three Months" in the Navi, the no results message WILL show
What is the link to your site?
hidden link
Hello,
I assume we are talking about this URL:
hidden link
See my screenshot no-item.JPG
It does output message as you mentioned above:
No apartments currently available match that search. Please check back later; apartments are updated regularly.
Is this problem resolved? please let me know if you need more assistance for it. thanks
Try using the filter again after you get that message. The message goes away and will no longer show.
hidden link
When you do not see the "no results" message, that means there are some result in views loop, you can edit the post view, in views loop display the post information, for example post title, you should see them in the result
If you need more assistance for it, please provide your website credentials in below private message box, I can setup a demo for you
I have tried these in your website:
1) Edit post view "Main Available Apartments View", in section "Loop Output Editor", line 10, add the post link shortcode:
[wpv-post-link]
2) Test it in front-end:
hidden link
Field "BEDROOMS" choose option: 4 Bedrooms, click button "Filter", I can see the post links in the result area. Can you confirm it?
The problem is in post view "Main Available Apartments View", in section "Loop Output Editor", line 10, you are using below condition shortcode:
[wpv-conditional if="( '[wpv-post-taxonomy type='availability' format='slug' ]' ne '' )"][wpv-post-body view_template="Basic Apartment Boxes"][/wpv-conditional]
It conducts the problem you mentioned above, if you don't need it, you can remove [wpv-conditional] shortcode manually.
We are still seeing the issue. I have re-created the conditions from the live site on staging. Our issue is that we want the "Join Our Waitlist" to display if there are no available apartments for lead generation. If you click the link below, we are expecting to see the "Join our waitlist" text and button since there are no results.
hidden link
It seems that you have added some custom CSS codes in your theme file:
hidden link
line 785~787:
/* Removes added URLS on Apartment Views Page */
.type-box .row > a {
display: none;
}
Above CSS codes will hide the result of views, but it can not display the "no item found" result
In your case, it needs to use custom codes to add another taxonomy filter into Views query, filter the results which have terms in taxonomy "availability", I have done below modifications in your website:
Edit your theme file "functions.php", line 234~247, add below codes:
add_filter( 'wpv_filter_query', 'availability_EXISTS_func', 999, 3 );
function availability_EXISTS_func( $query_args, $views_settings, $view_id) {
$view_ids = array( 78 );
if (in_array($view_id, $view_ids)){
if(!isset($query_args['tax_query'])){
$query_args['tax_query'] = array();
}
$query_args['tax_query'][] = array(
'taxonomy' => 'availability',
'operator' => 'EXISTS',
);
}
return $query_args;
}
More help:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters
My issue is resolved now. Thank you!