Sonya Lynn Designs

Blogging McBloggerson

  • WordPress How To
  • WordPress Plugins
  • WordPress Themes

Sonya Lynn's recommended guides on 'How-To Wordpress'.

Add Theme Support For WooCommerce

If you are using a custom theme with WooCommerce, make sure to declare WooCommerce support using the add_theme_support function. This will enable WooCommerce template overrides and ensure that your theme is compatible with WooCommerce. If you don’t declare WooCommerce support, your shop may be displayed using shortcode-based unsupported theme rendering.

Declaring WooCommerce support is straightforward and involves adding one function in your theme’s functions.php file.

function mytheme_add_woocommerce_support() {
    add_theme_support( 'woocommerce' );
}

add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );

Another way of adding this code without editing your theme file is by using a WordPress plugin, WPCode. Just create and activate a code snippet in your WordPress admin panel to add this functionality.

Read more about adding theme support to your WordPress theme: https://woocommerce.com/document/woocommerce-theme-developer-handbook/#section-5

Problem Solved: Main Menu Navigation Links Not Working

This happened to me twice recently on two different blogs I was working on this week: I don’t know when, why, or how this started happening, but when I clicked on any of the navigational links in my header menu, nothing would happen. I couldn’t get to any posts or categories, I just kept getting the home page. The URL would say the correct post address, yet all I saw was the home page. Very frustrating! What happened? How do I fix it?

After scratching my head for a quick minute, Alien Tom reminded me to try something. I was pleased that my first troubleshooting attempt worked!

Permalinks Settings Options

Here’s what I did:

  • In the WordPress Admin panel, Navigate to the settings menu, and select “Permalinks”.
  • Change the permalinks structure twice. Once to a different setting (click save), then the second time back to the setting it was supposed to be on (click save). Voila! My navigation links worked again! Yay!

I hope that this helps someone else out there that may be banging their head over this one! 😀

 

Loading Comments...