If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
December 12, 2012 at 6:41 pm #18675
is there a way I could preset (CSS?) the values for the product gallery options, i.e. create my own default values?
for every product
– Gallery Layout = 3 column gallery
– Enforce Default Background? = Use the default gallery as background
– Background Gallery controls = Hide controls
Is there a way to generally disable “Allow comments” for products (option available only on “Quick edit”)?
BrunoDecember 13, 2012 at 7:53 pm #100394
Yes. It would require editing of the theme files. To do this I suggest you install Notepad ++ ( http://notepad-plus-plus.org/download/v6.2.2.html )
The way I find something in the theme files , is I have them unzipped locally and I search with Notepad++ for some word located next to what I want to edit. Usually a nearby CSS selector. This time there is a dropdown with 3 Column Gallery so thats what i search for ‘3 Column Gallery’
.. and find it in file register-admin-metabox.php in the /includes/admin/ folder. line 36. Now to make that default, I would need to switch places with the current default which is ”As background slider only” so, I take
'As background slider only' => "bg_gallery"
and switch it with
'3 Column Gallery' =>'three_columns'
so the final result looks like
"subtype" => array( '3 Column Gallery' =>'three_columns', 'As background slider only' => "bg_gallery",
'Image Slideshow at the top of the entry' =>"fixed thumbslider bg_gallery",
'Flexible Grid Gallery' =>'flexible masonry',
'Image list attached to the entry' =>"fixed attached_images bg_gallery",
'Wordpress Default Gallery attached to the entry' =>'gallery_shortcode',
Using this same workflow you can change the other defaults you wanted, and they are probably in this same page also.
Your question about comments is answered here : http://en.support.wordpress.com/enable-disable-comments/
NickDecember 13, 2012 at 8:58 pm #100395
this helped a lot.
In file “flashlight/includes/admin/register-admin-metabox.php” I needed to change line 30
from: “std” => “bg_gallery”,
to: “std” => “three_columns”,
and it worked!
* * *
Now I discovered the “Discussion” page and disabled the “comments”.
I took the opportunity to correct a typo: in line 72/76/77 (register-admin-metabox.php) it should read “controls” instead of “controlls.
;-)December 13, 2012 at 9:24 pm #100396
Just be careful , since components are reused sometimes you can disable something which you dont want on one page and want on another page. It is always best to see if it can be gotten out of the way with CSS than by editing template files.
Take a look here, there are a couple of snippets of code on there for various WooCommerce customization related to allowing people to rate products before or after logging in…
The topic ‘Preset for product gallery options’ is closed to new replies.