Okay
  Public Ticket #1625308
replacing theme search with ajax search pro
Closed

Comments

  •  1
    PamARCS started the conversation

    Hello,

    I've purchased a new plugin (ajax search pro) and need to replace the theme search with this new one.

    It seems that this needs to be done through the theme code. Where can I find the code for the search to modify it?


  • [deleted] replied

    Hi PamARCS,

    I have added the following code in:

    Kalium: search-results.php (tpls/search-results.php)


    (view large version)

    <?php
    // AJAX Pro Search
    echo '<div class="asp-search-container">';
    echo do_shortcode( '[wd_asp id=2]' );
    echo '</div>';
    // End: AJAX Pro Search
    ?>

    So now the search bar is shown on search page:


    (view large version)

    You can modify the shortcode value where id=2 so place your prefered search. I hope this helps you.

  •  1
    PamARCS replied

    Hi Arlind,

    Wow, thank you so much for your help.

    However, I was hoping to replace the existing search. Is there a way to do this? 

    I will see if I can play around a bit with this - I definitely appreciate you looking into this. 

    Thank you kindly.

  •  1
    PamARCS replied

    Hi Arlind,

    I was also wondering if being that the code was placed under "search results" this is why it shows up on the results page.

    If I was to copy - paste this code under "search form" instead will the ajax search replace the original theme search?

  • [deleted] replied

    Hi PamARCS,

    I am glad that this helped you. I am not sure how do you want to place the search bar in our theme, maybe you can make a screenshot and draw the location where do you want to assign the search bar so I will have an idea what kind of code to give you.

  •  1
    PamARCS replied

    I had requested also some help from the developers of the search and they were able to help me by editing the following file: wp-content/themes/kalium/inc/laborator_functions.php file

    Now the search works, however it seems to some how have disabled our mobile menu.

    Could I get the original shop wp-content/themes/kalium/inc/laborator_functions.php file please?

    This way we can get back our mobile menu functionality while we fix the details.

    If you visit the website now you can see how the search works great but if you take a look at the mobile version, the menu does not show up anymore. Any ideas on how to fix this would be welcome. 

  • [deleted] replied

    Hi PamARCS,

    Sure, here you have the laborator_functions.php file:

    https://d.pr/f/5TATCg

    If you want to have the search bar inline with menu:


    (view large version)

    I can give you the code for that.

  •  1
    PamARCS replied

    Hi There,

    Thank you so much for your help.

    We were able to set up the search the way we wanted it and it works wonderfully.

    Thank you so much for your help.

  • [deleted] replied

    Glad to hear that

    Have a great weekend and enjoy Kalium!

    P.S: If you like our theme, it would help us a lot if you could give us a five-star rating on Themeforest from your Downloads tab.

    A huge thank you from Laborator in advance!

  •  1
    PamARCS replied

    Oh absolutely, its Done! you guys are great.

    Thank you! :)

  • [deleted] replied

    Thank you very much.

    Have a great week!

    Will set this ticket as solved from here.