Elio
Forum Replies Created
-
Forum: Plugins
In reply to: [SearchWP Modal Search Form] Apostrophe change to question markHi @jasnick,
You should be able to fix this issue by adding this small code snippet to your functions.php:
// Preserve emojis and special characters in menu items when SearchWP Modal is used add_filter( 'wp_nav_menu', function ( $nav_menu, $args ) { return mb_convert_encoding( $nav_menu, 'HTML-ENTITIES', 'UTF-8' ); }, 9, 2 );Please note that the code above uses the PHP mbstring extension so you may want to make sure this extension is installed and enabled in your server. Your hosting provider can help you with that.
I hope this helps!
Forum: Plugins
In reply to: [SearchWP Live Ajax Search] Display excerpt on previewHi @coopersita,
the SearchWP Live Ajax Search uses a template to render the search results.
This template can be customised following the steps in this guide: https://searchwp.com/extensions/live-search/#customizing-resultsOnce you have created a copy of the template following the guide above, you can replace the template code with this which includes an excerpt:
https://gist.github.com/BrElio/7a1e2d38d959a7b8f96479dd3b081ddb
I hope this helps!
Forum: Plugins
In reply to: [SearchWP Modal Search Form] Full doc page: shortcode code rendered as buttonHi @johanponken,
thanks for pointing out the issue in our documentation!
I have updated the content and you should now see the correct shortcodes to use.Thanks
Forum: Plugins
In reply to: [SearchWP Live Ajax Search] Editing settingsHi @ryanbester77,
I had a look at the site you linked but I don’t see the SearchWP Live Ajax Search working on the search form that opens when clicking on the magnifying lens.
SearchWP Live Ajax Search works out of the box with the native WordPress search forms but not with the Elementor search widget.
For it to work with the Elementor search form please add the class “swp-live-ajax-form” to the Elementor form settings.
Then add this code to your site functions.php: https://gist.github.com/BrElio/0aa7b045becd4fd572b10bee4e1307f3
This should make the Live Ajax Search work with any Elementor form with the above class.The plugin doesn’t style the results link color and it inherits the styles from the site styles.
While there are no options to style the background and text colour, you can add custom CSS to your site to do that:
.searchwp-live-search-results { background: white; } .searchwp-live-search-result a, .searchwp-live-search-result a:visited { color: blue; }I hope this helps but if there is something unclear let me know!
Forum: Plugins
In reply to: [SearchWP Live Ajax Search] Customizing the resultsHi @stephenkrem,
Your screenshot shows a template from another plugin. That might be why it is not working for you.
This is a sample template for the SearchWP Live Ajax template that includes the post thumbnail:
https://gist.github.com/BrElio/ea19d8e586bcdbf9265e46b092d465a7I hope this helps!
Forum: Plugins
In reply to: [SearchWP Modal Search Form] MobileHi @tony-franco,
SearchWP Modal can work with the default WordPress menus.
Your site uses a non standard WordPress menu for mobiles. This menu is built using a dropdown input which cannot be controlled by SearchWP Modal.
For the SearchWP Modal to work with your site on mobiles, you would need to use the default WordPress menu and use CSS to style it to fit on mobiles.
I am sorry I don’t have better news!
Forum: Plugins
In reply to: [SearchWP Modal Search Form] MobileHi @tony-franco,
thanks for getting in touch!
Could you please give me some more details on what is not working and if possible a link to the site that has the issue so I can see it firsthand?Thanks
Forum: Plugins
In reply to: [SearchWP Modal Search Form] HTML Validation fail – invalid duplicate elementHi @wykananda,
Thanks for pointing that out!
We have updated the link to the correct template code.Forum: Plugins
In reply to: [SearchWP Modal Search Form] HTML Validation fail – invalid duplicate elementHi @wykananda,
thanks to bring this to our attention!
We will correct the template used by the plugin in the next update.
In the mean time you can customise the template and replace the <main> tag with a DIV as described in this guide: https://searchwp.com/extensions/modal-form/#templates
If you need any further help please let me know!
Forum: Plugins
In reply to: [SearchWP Modal Search Form] Search wordsHi @sherry22,
SearchWP Modal Search Form only adds a search form to the site but the search would still be run by WordPress.
You will have to check why WordPress is not finding pages on the site. Maybe another plugin, the theme or custom code are affecting the search on your site.
I hope this points you in the right direction!
Forum: Plugins
In reply to: [SearchWP Live Ajax Search] Disable user’s ability to press Enter upon searchHi @projectmuzzle,
the plugin doesn’t have any option to disable the form submission.
What you could do though is use the native WordPress search widget which use the form generated by the get_search_form() function.
This function loads the form present in the searchform.php template. If that template is not present on your theme you can add it manually.
The template should contain a search form like in these examples.
To prevent the search form from being submitted you should add an onsubmit attribute to the form element like this:<form action="/" method="get" onsubmit="return false;">I hope this helps!
Forum: Plugins
In reply to: [SearchWP Modal Search Form] Show image in search resultsHi @indigojones66,
the SearchWP Modal Search form only adds a search form to the site but it doesn’t change how the search works on your site.
The search results would still be rendered by your theme.
You would need to customise the template used by your theme to render the results.The default template for search results is called search.php and should be located in the main theme’s directory.
If you don’t see that template then your theme may use a different one and you would then need to ask the theme developers which template to customise.
I hope this helps!Forum: Plugins
In reply to: [SearchWP Live Ajax Search] script.min.js only on relevant pagesHi @infosion,
if you are using the block editor you can remove the inline scripts with this code:
add_action( 'init', function () { $form = searchwp_live_search()->get( 'Form' ); remove_action( 'wp_footer', [ $form, 'gutenberg_integration' ] ); }, 20 );That said, after looking more into this, I believe the Live Ajax Search functionality may break when dequeueing the scripts as suggested before.
This is because the scripts also needs to be localized with extra data. If you enqueue the scripts on your custom file the localization would not work.My suggestion would be to let the Live Ajax Search load its own files and scripts but use the code below to limit them only on specific pages:
add_action( 'init', function () { // List of post IDs where the Live Ajax Search should be loaded $swp_live_ajax_pages = [123,456]; // If the current page is not in the list prevent the scripts from loading if ( ! in_array( get_queried_object_id(), $swp_live_ajax_pages ) ) { return; } $form = searchwp_live_search()->get( 'Form' ); remove_action( 'wp_footer', [ $form, 'gutenberg_integration' ] ); add_action( 'wp_enqueue_scripts', function () { wp_dequeue_script( 'swp-live-search-client' ); }, 20 ); }, 10 );I hope this helps!
Forum: Plugins
In reply to: [SearchWP Live Ajax Search] script.min.js only on relevant pagesHi @infosion,
there is not an option to prevent the loading of the Javascript file but you can dequeue the file and then enqueue your own file:
add_action( ‘wp_enqueue_scripts’, function () {
wp_dequeue_script( ‘swp-live-search-client’ );
}, 20 );Please note that the script depends on jQuery so that should be specified on your wp_register_script.
I hope this helps!
Hi @shaneholloman,
at the moment it is only possible to customise the lines that make up the spinner as described in this guide: https://searchwp.com/extensions/live-search/#searchwp_live_search_configs
If you need further help let me know!