• Resolved dudgemaster

    (@dudgemaster)


    Hey everyone, I hope someone can help me.

    My website has several hundred products on, but for our premium brand I have created a different template. The problem is because woocommerce is based on the home page, all the products are using that template.

    What I want to do is set woocommerce to display premium products with a different header or page template to match the premium brand.

    If anyone can help, it would be much appreciated.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Sounds like you’ll need to override the normal WooCommerce template with your own one, and then add a category conditional to show/hide various content areas. Best would be to take a closer look at the following guides:

    Thread Starter dudgemaster

    (@dudgemaster)

    Okay, so I now understand I can use hooks to call up different template parts for different circumstances.

    If i was to use a conditional tag “is_product_category(miele)”, how could I then get it to call the correct template, and which file should I be inserting this into?

    Sorry i’m pretty new to WP developing

    Thread Starter dudgemaster

    (@dudgemaster)

    Okay so now I have the following in the woocommerce.php

    <head>
    <?php get_header(); ?>

    <?php
    if ( is_product_category( ‘miele’ )){
    get_template_part( ‘template-parts/template-part’ , ‘miele-head’ );
    } else {
    get_template_part( ‘template-parts/template-part’ , ‘head’ );
    }
    ?>
    </head>

    but the head is not changing for different products.
    Can anyone tell me where I am going wrong?

    Thanks,
    Dan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product Dependent Page Template’ is closed to new replies.