Benjamin Seifert
Benjamin Seifert

Reputation: 21

Woocommerce - different/individual page.php

i want to use a different navigation and some other individual codes for all WooCommerce pages.

For archive-product.php or content-single-product.php this is no problem. I used them in my themechild (theme-chiild/woocommerce). But for pages like cart or checkout its not working.

Is it possible to use a different page.php for all WooCommerce pages?

Upvotes: 0

Views: 247

Answers (1)

Bazdin
Bazdin

Reputation: 1069

Cart and Checkout by default use your default page.php and just use a shortcode to generate the page content.

So you have a few options.

  • Modify page.php to check if it is cart/checkout
  • Create a custom page template for both that modifies what you need
  • Create a custom page template for each if you need different options on each
    • In Woocommerce > templates you do have cart/checkout templates as well

Depending on the level of customization. You may need to hook into those pages to add/remove what you need. https://docs.woocommerce.com/wc-apidocs/hook-docs.html

Upvotes: 1

Related Questions