-
Author
-
February 27, 2018 at 04:59 #189952getmebrianParticipant
Hello.
In the search results, I would like it not to show items in the media library. Under Theme Options > Header, I have excluded media from that search box and it works fine. But how do you do that for other KLEO search forms?
Thanks!
Brian
February 27, 2018 at 18:41 #190001LauraModeratorHello, try by adding this to functions.php of child theme 🙂
COPY CODEfunction attachments_search_pre_get_posts( $query ) { if (! is_search() ) return $query; $post_types = array( 'post', 'page' ); $query->set( 'post_type', $post_types ); return $query; } add_filter( 'pre_get_posts', 'attachments_search_pre_get_posts' );
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 27, 2018 at 18:46 #190002getmebrianParticipantThanks, it is saying there is an issue with this line:
$query->set( ‘post_type’, $post_types );
Brian
February 28, 2018 at 04:34 #190053LauraModeratorHello, i see…
Maybe this can be done with css, do you want to hide ANY image that is shown t search results?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 28, 2018 at 05:09 #190056getmebrianParticipantCorrect. I don’t want it to show results from the media library. Thanks.
Brian
February 28, 2018 at 18:51 #190129LauraModeratorHello, please try by adding this to style.css of child theme
COPY CODE.search-results .wrap-content img { display: none !important; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 28, 2018 at 20:20 #190137getmebrianParticipantThanks, but that is not working. Media results still show.
Brian
March 1, 2018 at 20:34 #190226LauraModeratorHello, can you share login access to admin dashboard so i can test it? 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 3, 2018 at 03:39 #190319LauraModeratorHello, i tested the search and i dont see any image, can you share a screenshot of what do you see?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 3, 2018 at 05:09 #190333getmebrianParticipantSure, I see it using the KLEO search in every location I have it enabled. Attached is an image from the home page demo.
Thx.
Attachments:
You must be logged in to view attached files.March 5, 2018 at 03:58 #190509LauraModeratorHello, i see, try adding this to style.css of child theme
COPY CODE.ajax_search_image { display: none !important; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 5, 2018 at 04:20 #190512getmebrianParticipantHi. That hides the thumbnail images on the Ajax results, which is not what we want to happen. The thumbnail images should show, but the Media results should not show. With this latest code, this is what it looks like attached.
Brian
Attachments:
You must be logged in to view attached files.March 6, 2018 at 22:13 #190729LauraModeratorHello, please try by adding this to style.css of child theme
COPY CODE.kleo-ajax-part.kleo-ajax-type-attachment { display: none !important; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 8, 2018 at 05:22 #190872LauraModeratorGlad it worked! If you didn’t already please rate us 5 stars at themeforest, that would help a lot!
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.