- This topic has 26 replies, 6 voices, and was last updated 3 years, 1 month ago by
Tom.
-
AuthorPosts
-
April 17, 2017 at 8:49 am #306854
Jay
Read the thread here on the support forum for the issue with the Lightbox disappearance and see that you are adding the code to an upcoming update…but is there an easy fix in the meantime? Could you add the WooCommerce Code…
add_action( ‘after_setup_theme’, ‘yourtheme_setup’ );
function yourtheme_setup() {
add_theme_support( ‘wc-product-gallery-zoom’ );
add_theme_support( ‘wc-product-gallery-lightbox’ );
add_theme_support( ‘wc-product-gallery-slider’ );
}to the Hooks add of GP Premium? Or does it have to be added specifically to the “If you’re managing your own WooCommerce theme you simply need to add a few lines to your after_setup_theme action. (most likely in your functions.php file).”
Cheers,
Jay Goodrich
GP Premium 1.2.96April 17, 2017 at 8:52 am #306856Leo
StaffCustomer SupportHi Jay,
The easiest way in the mean time is to add this code:
https://gist.github.com/generatepress/0d81e87b1ec4494023121f3ecc753ccdusing this method:
https://docs.generatepress.com/article/adding-php/#code-snippetsLet me know if this helps.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 17, 2017 at 9:17 am #306877Jay
Nice Leo!
Added the Code Snippets plugin and pasted your code from GitHub…works perfectly. That’s great little tool to know about. Thank you!
Cheers,
Jay Goodrich
April 17, 2017 at 9:46 am #306891Leo
StaffCustomer SupportGlad I could help!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 18, 2017 at 2:26 am #307153Key Largo
Hallo,
I had the same problem.
Using Code Snippets and your following code it works now:
add_action( ‘after_setup_theme’,’tu_woocommerce_gallery’ );
function tu_woocommerce_gallery() {
// Add support for WC features
add_theme_support( ‘wc-product-gallery-zoom’ );
add_theme_support( ‘wc-product-gallery-lightbox’ );
add_theme_support( ‘wc-product-gallery-slider’ );
}THX for the help!!
I tried also the revision, but there was a problem:
“The code snippet you are trying to save produced a fatal error on line 2: syntax error, unexpected ‘tu_woocommerce_gallery’ (T_STRING), expecting ‘(‘
I can not evaluate this – may be I made a mistake.
Greatings from Germany
KeyApril 18, 2017 at 8:16 am #307316Leo
StaffCustomer SupportHi Key,
Are you still having problem with this?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 19, 2017 at 8:02 am #307697Key Largo
oha – i just tried the revision again. now the site is down: error 500
what must i do now? deactivate the code snippet plugin via ftp?
April 19, 2017 at 8:18 am #307706Leo
StaffCustomer SupportYup that should work, or go in and fix/delete the code with error.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 19, 2017 at 8:50 am #307719Key Largo
i deinstalled the plugin via ftp now, and then the frot- and backend runs.
when i install now code snippets again, the side is down like before.
April 19, 2017 at 11:23 pm #308032Key Largo
hallo leo and tom,
do you have an idea what i can do, that the code snippets plugin can be activated again? at the moment the site goes down like after installing the revision code. there must be anywhere remains even after deleting and new installing code snippets.
April 20, 2017 at 12:09 am #308042Tom
Lead DeveloperLead DeveloperCheck out the FAQs here: https://en-ca.wordpress.org/plugins/code-snippets/
The “Help! I just activated a snippet, and my whole site broke!” question should help you.
Then you can delete that snippet completely.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 20, 2017 at 1:56 am #308067Key Largo
thx for the hint!
i did it like described, and now code snippets runs again without problems.
i installed the code (not the revision) and that works, but with some differences to storefront.
do you know, when you update GeneratePress for WC 3.0?
April 20, 2017 at 8:43 am #308174Leo
StaffCustomer SupportThe update should be coming soon 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 20, 2017 at 9:44 am #308200Tom
Lead DeveloperLead DeveloperThe update contains that exact piece of code though – all it should do is enable lightbox/gallery features, nothing else.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 27, 2017 at 11:09 pm #311319Visual D
Hi
I tried all of them and added the code to GP child-theme Functions.php, but non of them is working for me.
-
AuthorPosts
- You must be logged in to reply to this topic.