Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1440364

    Hi

    I have buy SearchWP to find better the shop products. I have install de code to instead os the standard search engine.

    It do not works and the searchWP results page do not works too.
    Could you help me?

    Thanks advance,

    BR,

    Antonio.

    #1440422

    Hey Antonio,
    I checked your ajax search, the search icon in your header, and it seems to work correctly, and I followed the link to the search results page and it also seems to work correctly.
    Please explain further what issue you are having.

    Best regards,
    Mike

    #1440437

    Hi Mike,

    I have install de code to instead of the standard search engine but I is not working.

    If I search in the header search go to this page results of the standard page results.
    Captura-de-pantalla-2024-04-20-a-las-19-25-25

    I would like to go to the wpserach results page:
    Captura-de-pantalla-2024-04-20-a-las-19-26-04

    I have create this page to show you the results page wpsearch:

    Thanks advance,

    BR,

    Antonio.

    #1440438

    Hi,
    The default search results parameter is /?s= and your plugin uses /?swp_form%5Bform_id%5D=1&swps=
    so perhaps if you change the parameter of s in the function to swp_form%5Bform_id%5D=1&swps
    it will direct to your plugin search results page
    Enfold_Support_5522.jpeg
    I recommend testing this modification via FTP and not in the WordPress ▸ Appearance ▸ Theme File Editor in case it crashes your site, you can remove the change easily via FTP even it your site is down.

    Best regards,
    Mike

    #1440625

    Hi Mike,

    I have change the parameter in enfold child function by FTP but nothing happen.
    I have clean the cache but not works.
    Thanks advance,

    BR,

    Antonio

    #1440679

    Hi,
    Please include FTP access so we can try some different parameters.

    Best regards,
    Mike

    #1440682

    Hi Mike,

    Many thanks, here I have send you.

    BR,

    Antonio.

    #1440856

    Hi,
    Thanks for the FTP access, but it opens a empty directory. Please ensure that the login has access to the root directory so we can access your functions.php file.

    Best regards,
    Mike

    #1440866

    Hi Mike,

    Sorry, I just send you the new one that I have testing.
    Thanks advance,

    BR,

    Antonio

    #1441076

    Hi,
    Thank you for your patience, I set the function above back to the original code from the documentation and then added a custom searchform.php file to your child theme with this:

    <?php
    if( ! defined( 'ABSPATH' ) )   { exit; }
    
    global $avia_config;
    
    
    // Modify the search parameters for custom search URL
    $search_params = apply_filters('avf_frontend_search_form_param', array(
        'placeholder'   => __('Search', 'avia_framework'),
        'search_id'     => 'swps',  // Changed from 's' to 'swps'
        'form_action'   => home_url('/') . '?swp_form%5Bform_id%5D=1', // Appended custom query string
        'ajax_disable'  => false
    ));
    
    $disable_ajax = $search_params['ajax_disable'] == false ? '' : 'av_disable_ajax_search';
    
    $icon = av_icon_char('search');
    $class = av_icon_class('search');
    ?>
    
    <form action="<?php echo $search_params['form_action']; ?>" id="searchform" method="get" class="<?php echo $disable_ajax; ?>">
        <div>
            <input type="submit" value="<?php echo $icon; ?>" id="searchsubmit" class="button <?php echo $class; ?>" />
            <input type="text" id="s" name="<?php echo $search_params['search_id']; ?>" value="<?php echo esc_attr(get_search_query()); ?>" placeholder="<?php echo esc_attr($search_params['placeholder']); ?>" />
        </div>
    </form>
    

    now your ajax form “Show all results” link points to ?swp_form%5Bform_id%5D=1&swps=
    Enfold_Support_5602.jpeg
    and lands on your custom SearchWP results page:
    Enfold_Support_5604.jpeg

    Best regards,
    Mike

    #1441218

    Hia Mike,

    Many thanks for your effect works perfectly.
    The only think is in the search results de header is off.
    Could you help me?
    Thanks advance,

    BR,

    Antonio.

    #1441220

    Hi,
    I’m not sure what you mean, I see your header on the search results page, see the screenshot in the Private Content area.
    Perhaps you mean that there is a large space at the top, try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    .html_header_top.html_header_topbar_active.html_header_sticky #top #main.swp-rp-main {
    	padding-top: 0;
    	margin-top: 0;
    }

    Best regards,
    Mike

    #1441223

    Hi Mike,

    If I click in shop menu I can see the header but in the result page I must do scroll to see the header.
    I don´t no why? I have add the code but its not works.
    Thanks advance,

    BR,

    Antonio.

    #1441225

    Hi,
    You are using a transparent header on your homepage and the text color is white, when you use the ajax search and hit the [enter] key it loads the searchwp template which is a white page, so you can’t see the white text in the header until you scroll and the header is no longer transparent.
    If you click the ajax search link “Mostrar todos los resultados” you go to a search results page that doesn’t have the transparent header, so eveything shows correctly.
    Unfortunately the search template doesn’t add a page class so we can’t know when to change the text color in the header.
    So your first option is to change your homepage to not use a transparent header, or you can ask searchwp for a function to add a custom body class when the search template is used.
    Or maybe your customers will scroll the page before they notice.

    Best regards,
    Mike

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