• Resolved charlie101

    (@charlie101)


    I thought this would be easy to find. It’s not. All search results go to incomplete solutions or recommendations to use the ‘Enhanced Category Page’ plugin that didn’t work for me (kept duplicating the content.)

    Anyone know how to create a custom template for product category pages so I can use my own code?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Inside your theme create “woocommerce” folder and inside it copy the file ‘content-product.php’ from “woocommerce/templates/” folder inside woocommerce plugin.

    Now you can edit this new file and it will override default woocommerce template.

    Doug – a11n

    (@dougaitken)

    Automattic Happiness Engineer

    Hi there @charlie101,

    As @tanja111 mentions, you would want to create an override for this.

    More details can be found here – https://docs.woocommerce.com/document/template-structure/

    Thanks,

    Thread Starter charlie101

    (@charlie101)

    Thanks for the replies.
    I have played around with that and roughly understand how it works – I am looking to play around with the CSS so I can change number of columns, font size etc. I see that the li tag calls up a function called post_class() but not sure how to utilize this…

    What would I need to do if, for example, I’d like to change the font size of the linked text for each item? Thanks

    • This reply was modified 6 years, 3 months ago by charlie101.
    • This reply was modified 6 years, 3 months ago by charlie101.
    • This reply was modified 6 years, 3 months ago by charlie101.
    • This reply was modified 6 years, 3 months ago by charlie101.
    • This reply was modified 6 years, 3 months ago by charlie101.
    Thread Starter charlie101

    (@charlie101)

    Never mind, I can see you merely pass an additional class as a parameter

    post_class(‘my-class’);

    thanks.

    • This reply was modified 6 years, 3 months ago by charlie101.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Create custom template for category pages in Woocommerce?’ is closed to new replies.