“Sorry, no posts matched your criteria” error with WooCommerce Shortcodes
-
I’ve got a custom WordPress theme that is giving me slight errors with WooCommerce shortcodes. I have created “My Account,” “Cart” and “Checkout” pages. They were working fine at first, and were displaying the correct content. I eventually decided to change my theme’s name (I initially wanted to set up the shop on a different domain name, but changed my mind and switched to a different one). I changed all instances of the old name everywhere.
Now, whenever I access any of the above pages, I only get a “Sorry, no posts matched your criteria” message (which the system is pulling from my index.php page). I have integrated the theme with Woocommerce as follows:
// Declare WooCommerce Support add_action( 'after_setup_theme', 'woocommerce_support' ); function woocommerce_support() { add_theme_support( 'woocommerce' ); } remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10); add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10); function my_theme_wrapper_start() { echo '<div id="content">'; } function my_theme_wrapper_end() { echo '</div>'; }
I do hope I got the div id right as I’m quite unsure about that. My markup is as follows:
<div id="wrapper"> <div id="header"></div> <div id="content"></div> <div id="footer"></div> </div>
So I assume it’s correct. I don’t think the problem is the integration of theme with WooCommerce.
Here’s my status report, in case it helps:
### WordPress Environment ### Home URL: https://www.websiteurl.com Site URL: https://www.websiteurl.com WC Version: 2.6.11 Log Directory Writable: ? WP Version: 4.7 WP Multisite: – WP Memory Limit: 168 MB WP Debug Mode: – WP Cron: ? Language: en_US ### Server Environment ### Server Info: Apache PHP Version: ? 5.4.35 - We recommend a minimum PHP version of 5.6. See: How to update your PHP version PHP Post Max Size: 32 MB PHP Time Limit: 60 PHP Max Input Vars: 1000 cURL Version: 7.38.0 OpenSSL/1.0.1e SUHOSIN Installed: ? MySQL Version: ? 5.5.52 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements Max Upload Size: 32 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 2.6.11 : woocommerce_sessions: ? woocommerce_api_keys: ? woocommerce_attribute_taxonomies: ? woocommerce_downloadable_product_permissions: ? woocommerce_order_items: ? woocommerce_order_itemmeta: ? woocommerce_tax_rates: ? woocommerce_tax_rate_locations: ? woocommerce_shipping_zones: ? woocommerce_shipping_zone_locations: ? woocommerce_shipping_zone_methods: ? woocommerce_payment_tokens: ? woocommerce_payment_tokenmeta: ? MaxMind GeoIP Database: ? ### Active Plugins (10) ### Envato Market: by Derek Herman – 1.0.0-RC2 WooThumbs - Awesome Product Imagery: by Iconic – 4.6.1 Jetpack by WordPress.com: by Automattic – 4.4.2 Maintenance Mode: by Lukas Juhas – 2.2.2 Max Mega Menu: by Tom Hemsley – 2.3.3 Slider Revolution Particles Effect: by ThemePunch – 1.0.1 Slider Revolution: by ThemePunch – 5.3.1.5 WooSwatches - Woocommerce Color or Image Variation Swatches: by parbat chaudhari – 2.2.7 WooCommerce: by WooThemes – 2.6.11 YITH WooCommerce Wishlist: by YITHEMES – 2.0.16 ### Settings ### Force SSL: – Currency: GBP (£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 ### API ### API Enabled: ? ### WC Pages ### Shop Base: ? Page not set Cart: #1489 - /my-bag/ Checkout: #1424 - /checkout/ My Account: #1426 - /my-account/ ### Taxonomies ### Product Types: external (external) grouped (grouped) simple (simple) variable (variable) ### Theme ### Name: Site Theme Version: 1.0 Author URL: https://www.site-theme.com/ Child Theme: ? – If you're modifying WooCommerce on a parent theme you didn't build personally then we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Overrides: MySite/woocommerce/archive-product.php MySite/woocommerce/cart/cart.php MySite/woocommerce/cart/mini-cart.php MySite/woocommerce/content-single-product.php MySite/woocommerce/global/quantity-input.php MySite/woocommerce/loop/sale-flash.php MySite/woocommerce/single-product/add-to-cart/variable.php MySite/woocommerce/single-product/price.php MySite/woocommerce/single-product/sale-flash.php MySite/woocommerce/single-product/short-description.php MySite/woocommerce/single-product/tabs/tabs.php
Everything was working fine last night, before I changed the theme name.
Any ideas? I think I must have overlooked something. Thanks a bunch!
UPDATE: I switched the theme and the problem persists, so the culprit must be something else.
- The topic ‘“Sorry, no posts matched your criteria” error with WooCommerce Shortcodes’ is closed to new replies.