Your Theme Does Not Declare Woocommerce Support

If you are getting the message. “Your Theme Does Not Declare WooCommerce Support” please follow the instructions below.

Find Your Theme

You need to know where your them is located and what one you are using. To do that log into your dashboard. Scroll down to where it says appearance. Then click on themes. There you will be able to see the theme that you are using.

Log Into Server Via SSH or FTP

The next step is to log into your server where you can manage files. I am going to mainly show you the SSH way of doing things since it is much faster and more secure. However you can do these steps with a FTP program or in a file manager. If you have cPanel log into your server via SSH with your cPanel username and password.

NOTE: Make sure you are NOT logged in as root!

ssh [email protected]

Navigate to where your wordpress files are. We want to see the directory wp-content. After you open wp-content you will see a folder called “themes”.  Go into that directory and you will see your theme folder. Go into your theme folder.

Shortcut Commands For Terminal

cd wp-content/themes

Copy page.php to woocommerce.php

Now what we want to do is make a copy of page.php only we want to name it woocommerce.php. So you will still have the page.php file. You are just making a copy of it so we can edit it for the woocommerce system. So enter the following into your terminal.

cp page.php woocommerce.php

Edit the Woocommerce.php File

Now we want to edit the woocommerce.php file. So type in the following into your terminal.

nano woocommerce.php

Look for the loop. The loop start with something like this.

<?php if ( have_posts() ) :

The lopp will end with something like this.

<?php endif; ?>

Delete those lines and everything in between them. To delete lines in terminal use “Control K” on the keyboard.

Now in that spot put the following code.

<?php woocommerce_content(); ?>

Declare WooCommerce Support

When you are all done with that you want to declare woocommerce support in your functions.php file. So type in the following into your terminal.

add_action( 'after_setup_theme', 'woocommerce_support' );
function woocommerce_support() {
 add_theme_support( 'woocommerce' );

Now check your page. You are now declaring woocommerce support.:-)

Your Theme Does Not Declare Woocommerce Support was last modified: April 16th, 2017 by Maximus Mccullough


Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.