‘Reject’ button color and ‘Open URL’
-
I’ve set a different color (red) for the ‘Reject’ button.
When it’s set to ‘Close Header’, the button is red.
When it’s set to ‘Open URL’, the button is black.I’d like to have a red button that opens the URL. π
-
Hi @wp-bernd,
We could not understand your query. Can you please confirm if your requirement is to have the same color for reject button for both ‘close header’ and ‘Open URL’ actions.
Yes, that’s the issue.
I’ve chosen red as color for the button. And if the function is ‘Close Header’, it is a red button.
But as soon as I make the function ‘Open URL’, the button is shown in black. The color setting is still red (or any other color).The same is true for the link color: it’s always white then.
I had a look at the code.
For the whole button:
[cookie_link] and [cookie_reject] have the same ID: ‘CONSTANT_OPEN_URL’.
CSS ID’s must be unique!
And then it’s no problem to assign the correct colors using something likevar main_link = jQuery('#cookie_action_load_url_reject'); main_link.css( ...For the text color:
Currently, ifvar main_link = jQuery('#cookie_action_close_header_reject');returns an empty ‘main_link’,main_link.css( 'color', settings.button_3_link_colour );cannot set the correct color.Right?
Hi @wp-bernd,
The issue has been fixed in the latest version of the plugin.
Sorry, not yet.
I selected a dark green for my [cookie-button] as ‘Accept’-button (‘Close Header’),
a dark blue for my [cookie-link] as ‘more Info’-button (‘Open URL’),
and a dark red for my [cookie-reject] as ‘Leave’-button (‘Open URL’).Now the ‘Reject’-button is [cookie-accept]-green. (Not the same green as my ‘Accept’.)
I’ve made 2 little changes to the 1.5.5 code to make it work for my needs, fixing color and double assignment of the id. But I don’t know if these changes break some of your code when settings are different.
Hi @wp-bernd,
We tried the exact same options from our side, with the latest version, and we are getting the result as in the screenshot
Please make sure you are using the latest version and let us know if the issue persists.
OK, got the ‘Reject’-button right.
Was wondering why it works for you but not for me, and the solution was to toggle between ‘Button’ and ‘Link’ once, saving the settings.But I have to correct my earlier statement about the [cookie-button]. Sorry for that, a typo. I’m using [cookie_accept] to define the sequence.
Could you try the following?
I’m using [cookie_accept], and it’s not the green I’ve chosen in the settings. Digging into this one, I see that using
[cookie_button] [cookie_link], I have the chosen colors, but in
[cookie_accept] [cookie_link] [cookie_reject], the [cookie_accept] has a different green. Would it be possible to define it’s color, too? Maybe the [cookie_button], because one wouldn’t use both?Thank you very much for you support!!!
PS: sorry for editing, but the typo’s…
Hi @wp-bernd,
The [cookie_accept] shortcode add the standard green “Accept” button that closes the header. The button is already styled and you can only change the colors of the button to the predefined colors which are: red, blue, orange, yellow, green and pink. For example, [cookie_accept colour=”red”].
Hi @markwt,
I was too busy to finetune wordpress, so I couln’t respond.
I understand. It’s the shortcode for easy configuration.
I’ve got it installed, and it works perfectly.
Thank You!
The topic ‘‘Reject’ button color and ‘Open URL’’ is closed to new replies.