[Résolu] Product archive displays correctly – individual products do not.
This support ticket is created Il y a 5 années. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Basically, the woocommerce product archive is displaying as I want.
However, the individual products don't load in my theme's container. See screenshots below. There's some weird breadcrumbs etc going on, and no max-width being applied.
It seems to be a compatibility problem between your theme "Pro" and Woocommerce view plugin, please try these:
1) Deactivate other plugins (except Views plugin + Woocommerce Views plugin) and switch to original parent theme "Pro", if the
2) If the problem still persists, please provide a copy of theme "Pro" in below private detail box, I need to test and debug it in my localhost, thanks
Thanks for the details, I can duplicate same problem, you can try this:
1) Copy file "woocommerce.php" from original "pro" theme folder, paste it into your current theme folder, rename it as "single-product.php"
2) Go to wordpress admin side, dashboard-> Toolset-> Woocommerce Views
in section "Product Template File", Enable option "Pro Theme Custom Product Template ", and test again
Where can I see the screenshot you mentioned above? hidden link
I just checked it in your website, test the single product post in front-end, for example: hidden link
I see screenshot: single-product.JPG
And it is only an example to show how to setup a theme file to display the single product post, and you will need to customize theme file to that you want.
Surely that doesn't look right to you- my theme's header and footer has disappeared.
Let me lay it out.
If I select Pro – Child Theme Custom Product Template, the single product loads fine, but I lose my theme's header and footer.
If I select WooCommerce Plugin Default Templates, My site's header and footer load, but the product page is messed up- hasn't loaded a container or something, as well as loading a strange breadcrumb thing that I never created.
If I select WooCommerce Plugin Default Templates, My site's header and footer load, but the product page is messed up- hasn't loaded a container or something, as well as loading weird.
If I select WooCommerce Views plugin default single product template, It loads my content template, but literally nothing else.
So, to summarize, here is what I want to happen (refer to the screenshot attached):
The area OUTSIDE the red box to be controlled by my theme, and appear exactly as it does in the screenshot.
The area INSIDE the red box to be controlled by Views, so I can use it to customize the layout using content templates.
As you can see it is a compatibility problem between your theme "Pro" and "Woocommerce Views" plugin, currently you can try this:
1) Restore your theme file back:
a) remove theme file "single-product.php"
b) Go to wordpress admin side, dashboard-> Toolset-> Woocommerce Views
in section "Product Template File", enable option "WooCommerce Plugin Default Templates"
2) Use Woocommerce plugin action hook to add a HTML div tag to wrap the product content, add below codes into your theme/functions.php:
add_action('woocommerce_before_main_content', 'my_func1');
add_action('woocommerce_after_main_content', 'my_func2');
function my_func1(){
echo '<div class="x-container max width offset">';
}
function my_func2(){
echo '</div>';
}