Search not working when WC is installed
-
My search bar on my site does not work at all and when I asked my theme developers why that is, they told me it’s because on WP when you install woocommerce the search defaults to products instead of content. That doesnt make sense, I have 4-5 products only and the bulk of my site is blogging content so the search is basically useless then once you have WC.
Does anyone have any insight on that? How can I make the search bar search my entire site?
thanks
The page I need help with: [log in to see the link]
-
Hi @katerila ,
Thanks for reaching out!
As I understand, the search function on your site is not working as expected, is this correct?
To clarify, when using the product search, only results of products will be displayed, and not those of pages and posts.
On the other hand, when using the search widget, the results will be displayed for products, pages and posts.
Please could you clarify if you are referring to the search widget or the product search bar?
Also, please can you share the following:
- System Status Report: navigate to?WooCommerce?→?Status. Select?
Get system report
?and then?Copy for support
. - Screenshot: Please share a screenshot of the search bar on your site that is not working as expected and the outcome after searching for a post/page on your site.
Snipboard.io?can be used for easily sharing screenshots – please follow the instructions on that page, then paste the URL in this thread.
Cheers!
Hi Roxy,
It’s not the product search bar, it’s the search widget (which I have on my sidebar on blog posts) and also the search bar which is on the navbar on the top right corner of my website. This is not supposed to search products but content. Yet, it only searches products.
This is what my theme support said: “If you have Woocommerce installed, WordPress will default to?searching?products rather than posts.”
How can I make it search the entire site without uninstalling WooCommerce?
I wasnt’ able to upload a screenshot but if you go on my site (link above) and just tap on the search icon on the upper right corner you can test it. Just search Greece or Italy (two topics I have many blog posts about) and you will get no results.
Here’s the WooCommerce status:
WordPress Environment WordPress address (URL): https://stayclosetravelfar.com Site address (URL): https://stayclosetravelfar.com WC Version: 7.5.1 REST API Version: ?</img> 7.5.1 WC Blocks Version: ?</img> 9.6.6 Action Scheduler Version: ?</img> 3.5.4 Log Directory Writable: ?</img> WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: ?</img> Language: en_US External object cache: – Server Environment Server Info: Apache PHP Version: 7.4.33 PHP Post Max Size: 256 MB PHP Time Limit: 120 PHP Max Input Vars: 3000 cURL Version: 7.85.0 OpenSSL/3.0.8 SUHOSIN Installed: – MySQL Version: 5.7.39-42-log Max Upload Size: 256 MB Default Timezone is UTC: ?</img> fsockopen/cURL: ?</img> SoapClient: ?</img> DOMDocument: ?</img> GZip: ?</img> Multibyte String: ?</img> Remote Post: ?</img> Remote Get: ?</img> Database WC Database Version: 7.5.1 WC Database Prefix: wp_ Total Database Size: 503.59MB Database Data Size: 442.12MB Database Index Size: 61.47MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 6.52MB + Index: 16.16MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.20MB + Index: 0.08MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 1.52MB + Index: 1.91MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 3.02MB + Index: 1.28MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 1.02MB + Index: 0.48MB + Engine InnoDB wp_adtribes_my_conversions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_aff_affiliates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_aff_affiliates_users: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aff_hits: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_aff_referrals: Data: 0.02MB + Index: 0.14MB + Engine InnoDB wp_aff_referral_items: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_aff_robots: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_aff_uris: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_aff_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_bv_activities_store: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_album: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_album_gallery: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_gallery: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_image: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_image_comment: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_image_rate: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_image_tag: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_shortcode: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_bwg_theme: Data: 0.08MB + Index: 0.00MB + Engine InnoDB wp_commentmeta: Data: 1.41MB + Index: 0.47MB + Engine InnoDB wp_comments: Data: 9.52MB + Index: 1.81MB + Engine InnoDB wp_convertkit_user_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_edd_customermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_edd_customers: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_e_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB wp_e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_e_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_FinalTiles_gallery: Data: 0.48MB + Index: 0.00MB + Engine InnoDB wp_FinalTiles_gallery_images: Data: 0.16MB + Index: 0.00MB + Engine InnoDB wp_frm_fields: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_frm_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_frm_items: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_frm_item_metas: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailchimp_carts: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mo_campaign_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mo_campaign_logmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mo_conversions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mo_email_campaignmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mo_email_campaigns: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mo_optin_campaignmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mo_optin_campaigns: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_nf3_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_action_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_nf3_chunks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_field_meta: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_nf3_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_form_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_nf3_objects: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_object_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_relationships: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nf3_upgrades: Data: 0.08MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 6.05MB + Index: 0.38MB + Engine InnoDB wp_postmeta: Data: 236.61MB + Index: 17.06MB + Engine InnoDB wp_posts: Data: 140.58MB + Index: 3.83MB + Engine InnoDB wp_pps_countries: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pps_popup: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wp_pps_popup_show_categories: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pum_subscribers: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_qss: Data: 0.05MB + Index: 0.05MB + Engine InnoDB wp_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_relevanssi: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_relevanssi_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_relevanssi_stopwords: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_sfa_abandoned_carts: Data: 3.52MB + Index: 0.00MB + Engine InnoDB wp_shortpixel_folders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_shortpixel_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_spu_hits_logs: Data: 0.27MB + Index: 0.39MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 1.52MB + Index: 3.03MB + Engine InnoDB wp_users: Data: 0.16MB + Index: 0.14MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.17MB + Index: 0.17MB + Engine InnoDB wp_wc_download_log: Data: 3.52MB + Index: 4.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.27MB + Index: 0.33MB + Engine InnoDB wp_wc_order_stats: Data: 0.25MB + Index: 0.20MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woo_wallet_transactions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woo_wallet_transaction_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wpam_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpam_affiliates: Data: 0.30MB + Index: 0.00MB + Engine InnoDB wp_wpam_affiliates_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpam_creatives: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpam_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpam_impressions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpam_messages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpam_paypal_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpam_tracking_tokens: Data: 0.31MB + Index: 0.00MB + Engine InnoDB wp_wpam_tracking_tokens_purchase_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpam_transactions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpfront_ure_login_redirect: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wpfront_ure_options: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wpfront_ure_post_type: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wpfront_ure_taxonomy: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wpml_mails: Data: 8.52MB + Index: 0.00MB + Engine InnoDB wp_wpr_rucss_resources: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wpr_rucss_used_css: Data: 0.14MB + Index: 0.19MB + Engine InnoDB wp_yith_wcaf_affiliates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_clicks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_commissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_commission_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_payments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_payment_commission: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_payment_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yoast_indexable: Data: 3.13MB + Index: 0.13MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 0.08MB + Index: 0.05MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_links: Data: 8.52MB + Index: 7.03MB + Engine InnoDB wp_yoast_seo_meta: Data: 0.14MB + Index: 0.00MB + Engine InnoDB Post Type Counts attachment: 1373 bwg_gallery: 1 bwg_share: 1 custom_css: 1 customize_changeset: 12 download: 1 elementor_font: 3 elementor_library: 9 frm_form_actions: 1 frm_styles: 1 ig_campaign: 2 ig_message: 5 jetpack_migration: 2 jp_img_sitemap: 1 jp_sitemap: 1 jp_sitemap_master: 1 mc4wp-form: 1 nav_menu_item: 50 oembed_cache: 39 page: 23 popup: 1 popup_theme: 6 post: 94 postman_sent_mail: 11005 product: 8 revision: 2155 shop_coupon: 70 shop_order: 1972 shop_order_refund: 7 shopr_product: 9 spucpt: 1 wpforms: 1 wprls_slider: 1 Security Secure connection (HTTPS): ?</img> Hide errors from visitors: ?</img> Active Plugins (19) Post SMTP: by Post SMTP – 2.4.5 Antispam Bee: by pluginkollektiv – 2.11.2 Booking.com Product Helper: by Booking.com – 1.0.4 Classic Editor: by WordPress Contributors – 1.6.2 GTM4WP: by Thomas Geiger – 1.16.2 Easy Social Share Buttons for WordPress: by CreoApps – 8.8 Elementor Pro: by Elementor.com – 3.5.2 Elementor: by Elementor.com – 3.8.1 Final Tiles Grid Gallery - Image Gallery: by WPChill – 3.5.6 Mailchimp for WooCommerce: by Mailchimp – 2.8.1 MC4WP: Mailchimp for WordPress: by ibericode – 4.9.2 SiteGround Optimizer: by SiteGround – 7.3.1 Abandoned Cart Reports For WooCommerce: by Small Fish Analytics – 2.6.4 Checkout Field Editor for WooCommerce: by ThemeHigh – 1.8.2 WooCommerce Stripe Gateway: by WooCommerce – 7.2.0 WooCommerce PayPal Payments: by WooCommerce – 2.0.3 WooCommerce: by Automattic – 7.5.1 WP Extra File Types: by Davide Airaghi – 0.5.2 WPFront User Role Editor: by Syam Mohan – 3.2.1.11184 Inactive Plugins (8) a3 Lazy Load: by a3rev Software – 2.7.0 Add From Server: by Dion Hulse – 3.4.5 Facebook for WooCommerce: by Facebook – 3.0.7 Head, Footer and Post Injections: by Stefano Lissa – 3.2.5 Relevanssi: by Mikko Saari – 4.18.3 WooCommerce Photo Reviews Premium: by VillaTheme – 1.0.9.2 WP Rocket: by WP Media – 3.11.4.2 Yoast SEO: by Team Yoast – 20.3 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: – Enforce Approved Product Download Directories: – Order datastore: WC_Order_Data_Store_CPT WC Pages Shop base: #323 - /presets/ Cart: #324 - /basket/ Checkout: #325 - /checkout/ My account: #326 - /my-account/ Terms and conditions: ?</img> Page not set Theme Name: Blossom (pipdig) Version: 2.4.2 Author URL: https://www.pipdig.co Child Theme: ?</img> – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ?</img> Templates Archive Template: Your theme has a woocommerce.php file you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues. Overrides: – WooCommerce PayPal Payments Onboarded: ?</img> Shop country code: US WooCommerce currency supported: ?</img> Advanced Card Processing available in country: ?</img> Pay Later messaging available in country: ?</img> Webhook status: ?</img> Vault enabled: ?</img> Logging enabled: – Reference Transactions: – Used PayPal Checkout plugin: ?</img> Tracking enabled: – Admin Enabled Features: activity-panels analytics coupons customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience product-variation-management settings Daily Cron: ?</img> Next scheduled: 2023-03-29 01:53:14 -04:00 Options: ?</img> Notes: 22 Onboarding: completed Action Scheduler Complete: 73 Oldest: 2023-02-25 17:38:40 -0500 Newest: 2023-03-28 13:06:50 -0400 Failed: 4,055 Oldest: 2022-11-04 13:17:42 -0400 Newest: 2023-01-16 21:32:59 -0500 Pending: 1 Oldest: 2023-03-28 19:02:53 -0400 Newest: 2023-03-28 19:02:53 -0400 Status report information Generated at: 2023-03-28 13:11:35 -04:00 `
Hi,
I created a post on my testing site:
When performing a search, this is the result:
I’m adding custom code for this workaround, I get the code from: How to make WordPress default search to WooCommerce search, feel free to check if this works on your case. You can add the custom code directly in your functions.php file, or using a plugin like the code snippets.
Hope this helps.
- System Status Report: navigate to?WooCommerce?→?Status. Select?
- The topic ‘Search not working when WC is installed’ is closed to new replies.