You could change your single-product.php to just be a redirect to the correct template depending on what product category the current product it.
To do so you’d copy single-product.php to your theme’s woocommerce folder. Rename it to single-product-default.php or anything. Create another copy and call it single-product-coffee.php. You can make whatever changes you’d like to make to this one.
Then in your single-product.php you could add a simple conditional to redirect to the appropriate single-product-something.php
if( has_term( 'coffee-maker', 'product_cat' ) ) {
$file="single-product-coffee.php";
} else {
$file="single-product-default.php";
}
global $woocommerce;
load_template( $woocommerce->template_url . $file );
Related Posts:
- How to assign custom template to specific products in Woocommerce?
- Woocommerce single product image blurred and small. Actual image is big
- Twenty Ten Theme: Replace the Logo by a picture without moving the code
- Changing appearance of WooCommerce product layout [closed]
- Stylesheet not being loaded? [closed]
- How to change background color in the Notepad++ text editor?
- Disable plugin / plugin action via theme
- What are all the available parameters for query_posts?
- How do I change the header image height in Twenty Seventeen?
- What are the package and subpackage comment for?
- How can I version the main CSS file?
- How to add plugins to wordpress theme?
- Two instances of WordPress with different URLs and themes
- Is “Featured Content” in Twenty Fourteen done with a plugin, or is it native in WP4.0?
- How can I use WordPress as a job board ? (but free)
- Can I Download a Free WordPress Theme, Edit it and Use it?
- How to create a theme option-menu page to save user values
- Are custom inner theme folders in any way overridable by child themes?
- How to put a banner ad between post 1 and post 2 on homepage only
- Check javascript file Proper way in functions.php
- How to reverse the pagination numbers of an archive?
- In which directory do I find a specific HTML code of my wordpress page? Some of it seems to be missing after checking all pages [closed]
- Why do Trackbacks/Pingbacks not appear below my posts/pages?
- Extra themes – ok or bad?
- WordPress AJAX in header.php
- Theme Customizer – How to create a sub panel
- Setting a static home page and blog page without using the settings
- Can’t Install Child Theme “The parent theme is missing. Please install the “Default” parent theme.”
- Change settings of get_post_type_object
- Sage WordPress – Plugin Namespace: Not Found
- Use a different template/theme if mobile only on home page
- Can i have a single wordpress site to have two themes ( one for pc other for mobiles)
- Translated my theme (translation not showing up)
- How to use get_page_by_title() with qTranslate?
- Changing $before_widget for certain widgets
- wp theme.. Could not create directory
- Multi-level page hierarchy
- How to conditionally display widgetized areas in theme customizer?
- How prevent someone from opening my theme directory
- loss of theme options while site deployment in production
- How to install WordPress theme and configure it? [closed]
- How do I get rid of or change the footer in my child theme?
- How can I make some themes usable only by admins?
- There is any way to remove post-format filter? [closed]
- Categories gone after changing theme / demos [closed]
- Angular integration with homepage
- Masonry images not working
- Own Theme Customizer displays error message when saving, saving still works
- 1 Database for multiple WordPress themes
- (Big issue) Blog is Getting Down Each day.. what should i do.?
- Page has a parent and $post->post_parent returns 0
- How to create different navigation for registered users in WooThemes Canvas?
- How to require users to login when not logged in
- Selected template is not respected for home page in WordPress
- How do I combine a theme with a plugin
- How to restore file or theme?
- A /proc folder in wp-content?
- how do i in ignore/disable/delete a javascript call from parent in child theme?
- How to install themes with the demo content?
- Jetpack CSS .screen-reader-text breaks mobile menu [closed]
- Error when using ‘continue reading’
- How to update theme to specific version
- Create a single website with 3 theme options in wordpress
- Child theme’s stylesheet cannot load [closed]
- Configure new installed WordPress in live server
- Where does WordPress get the theme name from to check for updates?
- Hi everybody, I have a problem of search box
- How to remove products-links after the product title using remove_action
- Changing an image in header.php
- Updating WordPress Theme Files
- Don’t load the theme for a page FROM a plugin EDITED
- Detect plugin/theme installation (via upload)
- Will I lose the pages I’ve created within a default WordPress theme when adding a new theme?
- Multiple sub directories for theme template pages
- How to get the theme directory URI?
- My blog suddenly can’t find my stylesheet?
- How to fix Scrape key check failed on WordPress VPS?
- Elementor Sidebar not loading when PRO elements plugin is active
- Fatal error: Class ‘RDTheme’ not found
- How to use my .mo file in the Divi child theme instead of file in a parent /builder directory?
- How to fix Gutenberg with SiteOrigin page builder deleting content when editing
- When the user entered an unauthorized url redirect to login page
- Edit a template while still keeping a Landing Page on the main address
- How to allow users to switch to the child theme from front end without plugin?
- Change whole theme depending on resolution
- post_prev & post_next within same category
- Costum Theme template directoy url problem
- How to find out which template the HTML content comes from?
- What is the general cut-off date for reviewed themes in the WordPress.org repository?
- Include root files into header files
- How can I modify the colors of my theme for a single section of my site? [closed]
- Commenting in CSS (//) equals “none”? [closed]
- Static posts page is not working
- Cannot use some themes within Managed WordPress of Go Daddy [closed]
- How to track your theme usage on the internet?
- How to add Company Logo to Chosen Theme
- What security risk is not having “default” theme?
- Fatal error Class-wp-hook, again, but not sure what’s triggering it
- Prevent primary navigational menu from expanding during page load (WordPress / Astra Theme)
- How to remove pop up on website (css changes not visible)?