Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › live results implementation vs results page problems
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 8 months, 2 weeks ago.
- AuthorPosts
- May 25, 2022 at 10:05 pm #37861
Hi there,
I have three questions (2 and 3 are ways to implement two different types of searches – live results vs. results page). Would love to test out both of the searches to utilize the best one:
1. I have a membership-only site. I would like to limit the search function to only those logged in. Right now, pages are protected; however, someone could download our attachments. Please advise!
2. Would love to utilize the same search functionalities (including attachment searches) as the Knowledgebase – https://knowledgebase.ajaxsearchpro.com/ (i.e., pop-up with live search results.) How do I implement this?
3. When I enable live search results attachments show up in the results section; however, when I enable a search results page, attachments do not show up in the results. How do I implement this?May 26, 2022 at 1:39 pm #37868Hi,
1. Do you mean only displaying the search bar for logged in users? You can try a custom code for that, it may work.
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.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. That is not a WordPress site, it is a completely custom made script, I’m afraid it is not possible to replicate like that. You can however place the plugin shortcode into any pop-up. Some themes do have pop-up support, which you can use for that.
3. Make sure to enable the results page override, that should do the trick. With some themes it may still not work though, as attachments are usually not meant to be on the results page.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 26, 2022 at 7:57 pm #37871hi ernest- this is great, thank you for the info!
1.) worked like a charm- thank you!
2.) too bad, it’s beautiful! nice work.
3.) it must not work with my theme. live results should be fine!one final question! the load button doesn’t get activated when i search. any advice?
May 27, 2022 at 12:53 pm #37882Do you mean the loader spinner? It might be set to the same color as the backgroun. Try chaning it here: https://i.imgur.com/HzWvakN.png
Best,
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.