• Resolved pixelshrink

    (@pixelshrink)


    I’ve got a couple of separate but similar WC websites. They both use the same set of customised WC template files in a child theme for the most part, but some of them are only used on one of the sites.

    I want to use the same set of files on both sites to make life easier, so is it possible to add a condition for using that template file (e.g. wp-content/themes/child-theme/woocommerce/checkout/payment.php), otherwise it would be skipped over and the default WC template would be used (e.g. wp-content/plugins/woocommerce/templates/checkout/payment.php)?

    • This topic was modified 4 years, 8 months ago by pixelshrink. Reason: Clarification
    • This topic was modified 4 years, 8 months ago by pixelshrink.
Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m no developer, but what you might try is just a simple conditional in your template files that checks if the WordPress URL is X, Y, or Z. If so, it could output a custom template. If not, you’d have it output a plain copy-and-paste of the default WooCommerce template. You could include both of those in the same file.

    Does that make sense?

    Plugin Support Tseten a11n

    (@tibetanitech)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Condition to Ignore custom template file’ is closed to new replies.