So hopefully a simple question. I have a child theme installed and have been able to successfully override changes to a .php file that is held in my theme files by uploading it to my child theme.

If I want to copy and tweak a plugin file (wp-content/plugins/plugin_name/templates/store.php).

Do I just copy and tweak this file then upload it to my child theme?

I'm assuming a child theme doesn't apply to plugin files? If not, is the best way just to download the current file, make the tweaks then override the initial file with the new one in the plugin category?

Thanks!enter image description here

  • 1
    Hi. It depends on how the plugin is using the template. If it's simply using include(), I don't believe this can be done.
    – Jack Johansson
    Jul 31 '17 at 4:23
  • thanks for the info - I'll reach out to the plugin developer. Jul 31 '17 at 21:47
  • I've added the picture to the original question. Looks like maybe the width of the text box overlaps with the logo, forcing it to a new line. Ideally, they'd be next to each other, or the search box would left align if below. This is really getting out of my abilities lol. Again, much appreciate you. Aug 3 '17 at 0:25

The plugin must use wc_get_template() to load the template store.php. You can simply copy this file in your themes/YOURTHEME-child/woocommerce/. Your child template should be loaded.

  • 1
    Not necessarily true :(
    – DropHit
    Nov 10 '18 at 16:18

create plugin folder in your child theme and overtire file in it. your_child-theme/plugin-folder/templates/filename.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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