- This topic has 13 replies, 4 voices, and was last updated 7 years ago by Tom.
-
AuthorPosts
-
September 14, 2017 at 10:38 am #385465Katie Jones
Hi hi,
I’d like to have a button that removes all default colors from GP, so that none of that is pre-set.
If this – or anything else I suggest – isn’t something you want to add to the theme, what do you think about people writing plugins for GP? I don’t think I’ve seen one written by anyone but Tom so I wondered.
Woot,
KatieSeptember 14, 2017 at 2:48 pm #385584LeoStaffCustomer SupportHi there,
Buttons can be achieved with some CSS. Have you checked out the method on this page? https://docs.generatepress.com/article/adding-buttons/
Let me know if this helps.
September 14, 2017 at 7:30 pm #385676Katie JonesAh, I wasn’t clear – I meant a way to set the GP colors of text and background to null, instead of the default white/black/blue/etc. I can obviously already do that by just removing the fields, I just meant a quick way to programmatically set them all to null at the same time.
September 14, 2017 at 8:23 pm #385691LeoStaffCustomer SupportHmm what about Customizer > Colors > Buttons?
September 15, 2017 at 5:13 am #385873Katie JonesNope – forget the word ‘button’ – so when you install GP / GP Premium, some colors are set by default – like the default link color is blue, the default content & widget backgrounds are white. I just want a simple way to, for all values at once, remove those default colors, the same as happens when you individually remove those color settings. Does that make sense?
September 15, 2017 at 8:13 am #385986LeoStaffCustomer SupportAhh I see. But I still don’t get what would happen when that button is clicked though? Everything becomes transparent?
September 15, 2017 at 11:43 am #386120Katie JonesI’m not sure how the GP theme/plugin works, though ideally that would just entirely take out color/background styling for each of those elements, so there aren’t any default font colors / background colors, you just set the ones you want.
September 15, 2017 at 2:26 pm #386192LeoStaffCustomer SupportI’m still not quite seeing how this would work.
A color can’t really be removed (not theme specific). You could set everything to be transparent by default but it’s still a color and wouldn’t that make it very confusing when user first activate the theme?
And then the user would still have to go into the customizer and set each color like if there are already default colors?
Let me know what I am missing π
September 15, 2017 at 3:16 pm #386214Katie JonesI was thinking more like a button – this is the button part π – that would folks set the default colors to null. The theme/plugin’s default settings would be the same, that is really useful to have those settings at first to learn how to use the theme/plugin.
Like under Appearance > GeneratePress, you can delete all the settings for a particular section – “Delete Backgrounds Settings” – it would be useful to also have a global button to delete all color specifications – all backgrounds, hover colors, font colors, etc – so you have a blank slate to work with as far as color goes.
September 15, 2017 at 3:38 pm #386231LeoStaffCustomer SupportSo what happens when all the colors are removed? Everything becomes transparent?
September 16, 2017 at 3:25 am #386410JamalHi all
This is an option i would be interested in as well. When making websites i don’t usually have a mockup or something to go after so it would be of great help if i can create the “mockup” on my site. Just like starting with a blank canvas before beginning to design the site, something like this
Ideally all colors will be set to transparent as the default option, i will then load my color palettes through generate_default_color_palettes filter and will start with text color and so on.
Is this something that can be done with generate_options_defaults maybe?
September 16, 2017 at 10:10 am #386542TomLead DeveloperLead DeveloperYou can filter the default color options: https://github.com/tomusborne/generatepress/blob/1.4/inc/add-ons/colors.php#L96
For example, if we wanted the top bar background color to be empty (https://github.com/tomusborne/generatepress/blob/1.4/inc/add-ons/colors.php#L29), you could do this:
add_filter( 'generate_color_option_defaults', 'tu_filter_color_defaults' ); function tu_filter_color_defaults( $defaults ) { $defaults['top_bar_background_color'] = ''; return $defaults; }
September 17, 2017 at 1:12 pm #387029JamalAwesome !!!! Thank you very much Tom, this is great stuff.
Sorry Katie for having hijacked your thread, hope this solution works for you as well.
September 17, 2017 at 8:08 pm #387153TomLead DeveloperLead DeveloperFilters are awesome. Every single option default in GP and GPP are filterable π
-
AuthorPosts
- You must be logged in to reply to this topic.