Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a child theme in wordpress and one of the plugins I am using is called jigoshop.

I made a copy of a few php classes from the plugin and placed them in my child theme folder. I want these clases to override the ones from the plugin folder.

How would I go about doing that?

Thanks!!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I'm assuming this is mostlikly a hiearcy problem. For example, your stylesheets load in the order of child theme then plugin. What you need is to load the plugin styles first then your child theme.

You have a few options:

  1. Add the Css for your plugin manually after wp_head() in your header.php
  2. Unregister the plugin css file and then load all the styles in your theme's styles.css
  3. Register a new style to be inserted after the plugin runs.

Without really digging into the plugin or your code it's hard to give you an example.

share|improve this answer
    
So that is what I need to do if I want the duplicate files in my child theme folder to override the files in the plugin folder? –  novicePrgrmr Dec 25 '11 at 0:04
    
there are many ways to do it but basicly the first file (in this case your style.css) styles are getting overwritten by the second (in this case your plugins) so you need to make that not happy using a method above. –  BandonRandon Dec 25 '11 at 8:40
    
I'm sorry if I didn't state the question properly, but what I am having trouble with is that I made duplicates of some php files from a plugin I'm using. I placed them in my child theme folder and changed a few things in the code. I want wordpress to use the altered php files that are in my child-theme folder instead of the ones that are in the plugin folder. Thanks! –  novicePrgrmr Dec 28 '11 at 7:32
    
This is not possible for plugins without modifying the plugin. Your best bet is to copy your modified php to the plugin folder, create a new plugin with the modifications, or just modify the plugin files –  BandonRandon Dec 28 '11 at 8:02
    
Good to know thanks! –  novicePrgrmr Dec 28 '11 at 23:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.