Hi!
How do I hide the “No products found which match your selection” text displayed for the product grid?
I have a membership setup where only logged in members with access to the products can see what’s available. For the regulars, I don’t want them to see that message.
Thank you in advance!
Hey kellyCraftMedia,
Thanks for the link, you could use this css:
#top.home .av_three_fifth.avia-builder-el-5 p {
display: none !important;
}
but the problem is that there is not a class on the page for not logged in users, so this will hide the section for everyone.
It would be better to add it as a function with the “!is_user_logged_in()” in the functions.php
So give this a try in your functions.php:
function hide_message_not_logged_in(){
if( !is_user_logged_in() && (is_page('home') ){
echo '<style>
#top.home .av_three_fifth.avia-builder-el-5 p {display: none !important;}
</style>';
}
}
add_action( 'wp_head', 'hide_message_not_logged_in' );
If this works, then I would improve it by adding a custom class to the element with the message, right now it’s using the default element class “avia-builder-el-5” but this could change if you edit the page.
Best regards,
Mike
That quick CSS actually worked just fine for what I was going for. Thank you!
Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.
For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)
Best regards,
Mike