Storefront Theme Search Bar
-
Hi there!
On the Storefront theme, how can I refine the top-right search bar results to be slightly more inclusive?
For example, when I search “come thou” there are no results. But when I search “come, thou” there are three.
I thought I would be able to use a plugin like Relevanssi, but it appears not to affect that particular search bar. I was told this is because Woocommerce is overrides the search bar.
Any ideas would be much appreciated.
- This topic was modified 2 years, 11 months ago by psalterproject.
The page I need help with: [log in to see the link]
-
Hi @psalterproject – Thanks for starting a new thread over here for me. ??
I started looking into this on my on test site by creating two products that are duplicates of ones on your site: https://d.pr/i/xCHJim & https://d.pr/i/rLrPhB
Once those were created, I typed
come thou
(without the comma) into my site’s search bar (where I also use the Storefront theme): https://d.pr/i/PEjQu1What this tells me is that while, yes, WooCommerce does have some say in what shows up there, something else may be causing your search results to not return what they should.
Can you send me a copy of your site’s system status report? You can find that by going to the follow page in your admin dashboard: WooCommerce > Status > ‘Get system report’
I’ve copied the status report below.
It also just hit me… I’m using a Storefront child theme (created by someone else; I “inherited” management of this website). Could that be contributing to the issue?
### WordPress Environment ### WordPress address (URL): https://gregscheer.com Site address (URL): https://gregscheer.com WC Version: 6.0.0 REST API Version: ? 6.0.0 WC Blocks Version: ? 6.3.3 Action Scheduler Version: ? 3.3.0 WC Admin Version: ? 2.9.4 Log Directory Writable: ? WP Version: 5.8.2 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.25 PHP Post Max Size: 64 MB PHP Time Limit: 50000 PHP Max Input Vars: 5000 cURL Version: 7.64.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.5.5-10.5.12-MariaDB-1:10.5.12+maria~buster-log Max Upload Size: 64 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 6.0.0 WC Database Prefix: wp_ba617e1a58_ Total Database Size: 63.72MB Database Data Size: 47.88MB Database Index Size: 15.84MB wp_ba617e1a58_woocommerce_sessions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_woocommerce_downloadable_product_permissions: Data: 0.08MB + Index: 0.14MB + Engine InnoDB wp_ba617e1a58_woocommerce_order_items: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_woocommerce_order_itemmeta: Data: 0.23MB + Index: 0.25MB + Engine InnoDB wp_ba617e1a58_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_ba617e1a58_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_woocommerce_log: Data: 26.56MB + Index: 1.52MB + Engine InnoDB wp_ba617e1a58_actionscheduler_actions: Data: 0.25MB + Index: 0.39MB + Engine InnoDB wp_ba617e1a58_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_actionscheduler_logs: Data: 0.20MB + Index: 0.19MB + Engine InnoDB wp_ba617e1a58_activecampaign_for_woocommerce_abandoned_cart: Data: 0.08MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_brizy_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_commentmeta: Data: 0.11MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_comments: Data: 0.09MB + Index: 0.09MB + Engine InnoDB wp_ba617e1a58_duplicator_packages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_ms_payments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_nxs_log: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_nxs_query: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_options: Data: 3.47MB + Index: 0.20MB + Engine InnoDB wp_ba617e1a58_postmeta: Data: 3.52MB + Index: 2.77MB + Engine InnoDB wp_ba617e1a58_posts: Data: 3.52MB + Index: 0.47MB + Engine InnoDB wp_ba617e1a58_redirection_404: Data: 0.22MB + Index: 0.08MB + Engine InnoDB wp_ba617e1a58_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_ba617e1a58_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_ba617e1a58_relevanssi: Data: 5.08MB + Index: 5.08MB + Engine InnoDB wp_ba617e1a58_relevanssi_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_relevanssi_stopwords: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_revslider_sliders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_revslider_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_social_users: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_ssp_stats: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_termmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_term_relationships: Data: 0.11MB + Index: 0.06MB + Engine InnoDB wp_ba617e1a58_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_usermeta: Data: 2.52MB + Index: 3.03MB + Engine InnoDB wp_ba617e1a58_users: Data: 0.22MB + Index: 0.23MB + Engine InnoDB wp_ba617e1a58_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_wc_customer_lookup: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_wc_download_log: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_wc_order_product_lookup: Data: 0.08MB + Index: 0.06MB + Engine InnoDB wp_ba617e1a58_wc_order_stats: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wp_ba617e1a58_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ba617e1a58_wc_product_meta_lookup: Data: 0.11MB + Index: 0.27MB + Engine InnoDB wp_ba617e1a58_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ba617e1a58_yith_wcwl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ba617e1a58_yith_wcwl_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### attachment: 1002 blocks: 8 brizy-project: 1 custom_css: 1 customize_changeset: 5 flamingo_contact: 52 flamingo_inbound: 58 ms-albums: 1 ms-artists: 1 ms-music: 20 ms-plans: 3 ms-radios: 7 nav_menu_item: 19 oembed_cache: 2 page: 17 podcast: 7 post: 21 product: 215 product_variation: 239 revision: 396 shop_order: 248 wpcf7_contact_form: 1 wpforms: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (25) ### ActiveCampaign for WooCommerce: by ActiveCampaign – 1.6.1 ActiveCampaign: by ActiveCampaign – 8.1.8 Akismet Anti-Spam: by Automattic – 4.2.1 Contact Form 7: by Takayuki Miyoshi – 5.5.3 Disable Theme and Plugin Auto-Update Emails: by KZeni – 1.0.4 Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 4.3 Duplicator: by Snap Creek – 1.4.3 Grid & List toggle for Woocommerce: by phoeniixx – 1.4.2 Health Check & Troubleshooting: by The www.ads-software.com community – 1.4.5 Jetpack: by Automattic – 10.4 Mediamatic: by plugincraft – 1.7 Nextend Social Login: by Nextendweb – 3.1.3 Redirection: by John Godley – 5.1.3 Relevanssi: by Mikko Saari – 4.14.4 Seriously Simple Podcasting: by Castos – 2.9.9 Seriously Simple Stats: by Castos – 1.3.0 Seriously Simple Transcripts: by Castos – 1.0.1 The Social Links: by Seagyn Davis – 2.0.5 UpdraftPlus - Backup/Restore: by UpdraftPlus.Com DavidAnderson – 1.16.66 WooCommerce PayPal Payments: by WooCommerce – 1.6.3 WooCommerce Shipping & Tax: by WooCommerce – 1.25.20 WooCommerce: by Automattic – 6.0.0 WooSidebars: by WooCommerce – 1.4.5 WP Mail SMTP: by WPForms – 3.2.1 ReCaptcha v2 for Contact Form 7: by IQComputing – 1.3.6 ### Inactive Plugins (2) ### Hello Dolly: by Matt Mullenweg – 1.7.2 WooCommerce PayPal Checkout Gateway: by WooCommerce – 2.1.3 ### Must Use Plugins (1) ### Health Check Troubleshooting Mode: by – 1.7.1 ### Settings ### API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #2301 - /shop/ Cart: #2302 - /cart/ Checkout: #2303 - /checkout/ My account: #2304 - /my-account/ Terms and conditions: ? Page not set ### Theme ### Name: Storefront Child Theme Version: 1.0.0 Author URL: https://stuartduff.com Child Theme: ? Parent Theme Name: Storefront Parent Theme Version: 3.7.0 – 3.9.1 is available Parent Theme Author URL: https://woocommerce.com/ WooCommerce Support: ? ### Templates ### Overrides: storefront-child/woocommerce/archive-product.php storefront-child/woocommerce/content-product.php storefront-child/woocommerce/loop/no-products-found.php ### WooCommerce PayPal Payments ### Onboarded: ? Shop country code: US WooCommerce currency supported: ? PayPal card processing available in country: ? Pay Later messaging available in country: ? Webhook status: – Vault enabled: ? Logging enabled: – Reference Transactions: – Used PayPal Checkout plugin: ? ### Action Scheduler ### Complete: 821 Oldest: 2021-11-22 11:31:16 -0500 Newest: 2021-12-23 06:00:23 -0500 Pending: 1 Oldest: 2021-12-23 10:46:30 -0500 Newest: 2021-12-23 10:46:30 -0500 ### Status report information ### Generated at: 2021-12-23 10:46:57 -05:00
Hi @psalterproject,
The search bar in the Storefront header is set to only search WooCommerce products. It’s still built with the default WordPress search, but it’s tied to the product custom post type.
What you could do is add a function to your child theme’s functions.php file to override the default search.
function storefront_product_search() { if ( storefront_is_woocommerce_activated() ) { ?> <div class="site-search"> <?php the_widget( 'WC_Widget_Product_Search', 'title=' ); ?> </div> <?php } }
You would replace the
<?php the_widget( 'WC_Widget_Product_Search', 'title=' ); ?>
with the search you’d like to use.See if that gets you pointed in the right direction.
Thanks!
We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.
- The topic ‘Storefront Theme Search Bar’ is closed to new replies.