• Resolved jr361202

    (@jr361202)


    I am using Woocommerce with “Perfect Woocommerce brands” plugin and I want to customize one of the brand pages. It looks like the brands are functionally tags from what I can tell, although the page look like a category page with item list.

    I know where the wordpress template files are but Woocommerce has added a serious layer of complexity and I don’t know how to trace where the template file to customize it.

    I’m really just looking to replace the page content for that tag ID with custom code so nothing fancy… just need to find the file to override in my child theme. Is there a way to echo the content area template part(s) in my footer php file or something so I can always trace what template(s) are running the content area?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can find the WooCommerce template files here:

    ../wp-content/plugins/woocommerce/templates/

    In order to override them in your child theme, you will need to create a folder called woocommerce within your child themes folder.

    Then, using a WooCommerce template file as an example:
    ../wp-content/plugins/woocommerce/templates/archive-product.php

    This would need to be copied to your child themes woocommerce folder eg.
    ../wp-content/themes/your-child-theme/archive-product.php

    This is also covered, in detail, in the WooCommerce documentation here: https://docs.woocommerce.com/document/template-structure/

    Also, a quick Google search on ‘how to display wordpress template file being used’ displays lots of answers. Here’s one I found in about 10 seconds: https://stackoverflow.com/questions/9405896/how-do-i-get-the-name-of-the-file-that-is-being-used-to-render-the-current-page

    I’m not sure, however, how the Perfect WooCommerce Brands plugin (and it’s templates) work. So, if the above doesn’t help then you may need to contact the plugin developer to get more information on their own templates etc.

    • This reply was modified 5 years, 10 months ago by xclamation.
    • This reply was modified 5 years, 10 months ago by xclamation.
    Thread Starter jr361202

    (@jr361202)

    For the record I did try to google how do display the current template file and it was kind of a jumble. I tried throwing echo ‘<p>1</p>’ into various templates that I thought it might be to see what hit and tried some stuff like get_the_page_template() and things and the header file since that loads on every page. So thank you for that link – that is going to come in handy.

    Thanks for the reply, I appreciate it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customizing a page – where is the template’ is closed to new replies.