live results implementation vs results page problems

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 Ernest Marcinko 2 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37861
    davidschwartz1206
    davidschwartz1206
    Participant

    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?

    #37868
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #37871
    davidschwartz1206
    davidschwartz1206
    Participant

    hi 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?

    #37882
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Do 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 :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.