0
votes

I'm using the WooShop theme on http://eventdepotnj.com and creating a child theme for it.

I made a new directory /wooshop-child with this style.css:

/*  
Theme Name: WooShop Child
Description: Child theme for WooShop
Author: Blue Star Multimedia
Template: wooshop
*/

and I added a functions.php file with this code:

<?php 

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

}

However it is not working.

I uploaded my edited header.php and footer.php files to the child theme folder to override the regular theme, and that worked. But when I make any changes to the style.css file, it's not showing up on my child theme, it doesn't seem to be picking it up. Any ideas?

1
if you browse directly to your stylesheet (eventdepotnj.com/wp-content/themes/wooshop-child/…) and refresh, do you see your code? - Hobo
I see code there, but it's not the most recently updated version (I just updated with a paragraph font size of 20px to see if it was working) - Blue Star Multimedia

1 Answers

0
votes

It looks like your server is caching the file. If I change the URL of the child's stylesheet from

http://eventdepotnj.com/wp-content/themes/wooshop-child/style.css?ver=4.1.1

to

http://eventdepotnj.com/wp-content/themes/wooshop-child/style.css?ver=4.1.2

(just to test), I see the 20px font size you mention in your comment. Checking Chrome's dev tools, I know I'm not seeing a locally cached version 4.1.1 - it's coming from your server.

I'd recommend automatically generating your version number based on the file modification time to stop it being cached. See my answer here for details.