Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1242929

    Hi there,
    i’m trying to add the SearchWP into the single.php in my child theme but i’m not able to make it works.

    I’m trying to follow the documentation in here https://kriesi.at/documentation/enfold/search/, so i copied and pasted the SearchWP code and the shortocode string “add_shortcode(‘avf_ajax_search_function’, ‘get_search_form’);” into my function.php, then i tried to add the shortcode into my single.php but it always return the default one and not the one with the search preview like when i’m using that one in “Content Elements”.

    What am i doing wrong?

    Thanks a million for your help.

    #1244035

    Hey belugatinu1,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1244219

    Hi Victoria,
    i’m refactoring the website and i’m working on my local machine so i’ll try to send you some screenshot but as i said i only added the SearchWP code into function.php and the shortcode into single.php.

    funtion.php
    https://www.agenziagiornalisticaopinione.it/wp-content/uploads/2020/09/function.png

    single.php
    https://www.agenziagiornalisticaopinione.it/wp-content/uploads/2020/09/single.png

    Thanks

    #1244397

    Hi belugatinu1,

    We need to see the actual css and html to be able to propose a solution for you. Please get back to us when you get the website to some testing server.

    Best regards,
    Victoria

    #1249186
    This reply has been marked as private.
    #1249652

    Hi get_search_form,

    The get_search_form function just renders the search form, it does not add the ajax function.

    I see the form added on the page and it works and I see another form on the home page. What do you need our help with?

    Best regards,
    Victoria

    #1249657

    Hi,
    as i said in the previous comments, i would like to have the AJAX search in the article (single.php), the same AJAX search that is in the homepage now.

    Thanks

    #1250061

    Hi belugatinu1,

    The shortcode renders only that search form. To get a copy of the one that you have you need to have the Advanced Layout Builder debug mode enabled and copy the shortcode from that field to the single.php.

    Here is how to do it:
    https://kriesi.at/documentation/enfold/intro-to-advanced-layout-builder/#debug-mode

    Best regards,
    Victoria

    #1255806

    Hi,
    sorry for not getting back to you until now but that works!

    Thanks a million.

    #1256275

    Hi,

    Great, I’m glad that Victoria could help you out and thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.