- This topic has 4 replies, 3 voices, and was last updated 4 years, 3 months ago by
Tom.
-
AuthorPosts
-
May 20, 2021 at 9:21 am #1791561
Kelvin
Dear Sir/Madam,
I did set up the Woocommerce product page, I copy the Woocommerce template to the child theme, I can see all custom fields in meta area and the additional information. After I import the site-library “Shop”, all product meta and additional information lost. I checked the template file are still under the child theme, why they are lost? How can I fix it?
https://prnt.sc/136eklr (before site-library import)
https://prnt.sc/136em2z (after site-library import)Best regards,
Kelvin.
May 20, 2021 at 11:28 am #1791712Ying
StaffCustomer SupportHi Kevin,
For the product meta, go to customizer > layout > woocommerce, under single product, check the
Display product meta data
box.
https://www.screencast.com/t/tl6gGtfV6aFor the additional info, can you make sure in the product edit page, the
Visible on the product page
box is checked?
https://www.screencast.com/t/ceZ97UW7ngTLet me know 🙂
May 20, 2021 at 2:44 pm #1791872Kelvin
Dear Sir/Madam,
Please kindly visit the page listed in private information, don’t know why the import demo data will affect the product page.
Best regards,
Kelvin
May 20, 2021 at 3:13 pm #1791886Kelvin
Dear Ying,
The meta issue fixed but additional information lost. I am sure all attributes are Visible on the product page ( see screenshot https://prnt.sc/136uvn6 ).
I put the custom single-product …/wp-content/themes/generatepress-child/woocommerce/single-product/tabs/tabs.php, I am sure it is called if I remove it from the folder and the default look is showed but also missing the additional information tab.
In the tabs.php, I changed the content as below, it just remove all tabs headers.
<div class="woocommerce-tabs wc-tabs-wrapper"> <?php foreach ( $product_tabs as $key => $product_tab ) : if (in_array($key, array('description', 'additional_information'))) { if ( isset( $product_tab['callback'] ) ) { call_user_func( $product_tab['callback'], $key, $product_tab ); } } ?> <br/> </div> <?php endforeach; ?> ...
I want to show the additional information look like the description content together, in the functions.php, I add below code to hide the additional information header, it worked before I imported the site-library.
function ebz_remove_product_tabs( $tabs ) { unset( $tabs['additional_information'] ); return $tabs; } add_filter( 'woocommerce_product_tabs', 'ebz_remove_product_tabs', 9999 );
Could you advise what setting be changed after I import the site-library demo data?
Best regards,
Kelvin.
May 21, 2021 at 8:03 am #1792865Tom
Lead DeveloperLead DeveloperHi there,
The code above will remove the Additional Information tab from your single products. How exactly are you adding it back? Inside a template file? If so, what happens if you add some static text into that location in the file, does it show?
If you remove your custom template files/functions, does the data display?
-
AuthorPosts
- You must be logged in to reply to this topic.