Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › New Search Bar Configuration
This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko 3 years, 1 month ago.
- AuthorPosts
- February 5, 2020 at 1:50 pm #25682
HI. I have a couple of questions…
1. Is it possible to hide the search bar on the home page? What I’m really looking for is to only have it visible if the user is logged in. For privacy reasons, This is a closed community. If they are not logged in, I don’t want them to be able to search. If this is not possible, is it possible to create a search page instead?
2. I built a search bar. I am trying to search member profiles. I am creating custom fields using Peepso. I need our users to be able to search these custom fields to find other members. For some reason, I’m struggling to understand how this should be set up to work. Is there something in the documentation that you could point out that would walk me through the setup?
Thanks for your help.
Jeff
February 5, 2020 at 4:03 pm #25687Hi Jeff,
1. It could be possible, but only by using a custom code.
Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!add_filter('asp_shortcode_output', 'asp_shortcode_output_logged_in', 10, 2); function asp_shortcode_output_logged_in($out, $id) { // Return the shortcode to logged-in users only if ( is_user_logged_in() ) { return $out; } else { return ''; } }
2. If PeepSo stores these fields as user meta fields (custom fields), then you should be able to select them here: https://i.imgur.com/OaefRzq.png
Best,
Just search and drag the field(s) you want to use.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.