-
AuthorPosts
-
April 19, 2024 at 2:23 pm #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.
April 20, 2024 at 3:06 pm #1440422Hey 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,
MikeApril 20, 2024 at 7:34 pm #1440437Hi 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.
I would like to go to the wpserach results page:
I have create this page to show you the results page wpsearch:
Thanks advance,
BR,
Antonio.
April 20, 2024 at 7:58 pm #1440438Hi,
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
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,
MikeApril 23, 2024 at 7:05 pm #1440625Hi 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
April 24, 2024 at 12:08 pm #1440679Hi,
Please include FTP access so we can try some different parameters.Best regards,
MikeApril 24, 2024 at 12:21 pm #1440682Hi Mike,
Many thanks, here I have send you.
BR,
Antonio.
April 25, 2024 at 5:29 pm #1440856Hi,
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,
MikeApril 25, 2024 at 6:58 pm #1440866Hi Mike,
Sorry, I just send you the new one that I have testing.
Thanks advance,BR,
Antonio
April 27, 2024 at 6:13 pm #1441076Hi,
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=
and lands on your custom SearchWP results page:
Best regards,
MikeApril 28, 2024 at 8:02 pm #1441218Hia 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.
April 28, 2024 at 8:13 pm #1441220Hi,
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,
MikeApril 28, 2024 at 8:18 pm #1441223Hi 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.
April 28, 2024 at 9:39 pm #1441225Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.