[Support request] Simple item for wish list

Home Forums Support [Support request] Simple item for wish list

Home Forums Support Simple item for wish list

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #385465
    Katie 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,
    Katie

    #385584
    Leo
    Staff
    Customer Support

    Hi 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.

    #385676
    Katie Jones

    Ah, 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.

    #385691
    Leo
    Staff
    Customer Support

    Hmm what about Customizer > Colors > Buttons?

    #385873
    Katie Jones

    Nope – 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?

    #385986
    Leo
    Staff
    Customer Support

    Ahh I see. But I still don’t get what would happen when that button is clicked though? Everything becomes transparent?

    #386120
    Katie Jones

    I’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.

    #386192
    Leo
    Staff
    Customer Support

    I’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 πŸ™‚

    #386214
    Katie Jones

    I 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.

    #386231
    Leo
    Staff
    Customer Support

    So what happens when all the colors are removed? Everything becomes transparent?

    #386410
    Jamal

    Hi 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?

    #386542
    Tom
    Lead Developer
    Lead Developer

    You 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;
    }
    #387029
    Jamal

    Awesome !!!! Thank you very much Tom, this is great stuff.

    Sorry Katie for having hijacked your thread, hope this solution works for you as well.

    #387153
    Tom
    Lead Developer
    Lead Developer

    Filters are awesome. Every single option default in GP and GPP are filterable πŸ™‚

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.