Posted: September 19, 2017 at 7:31 pm
I see in other Forum posts that you can change the text of a button through filters. However, is there a way to change the class name(s) of a button through filters as well? I know changing the look of a button is possible with CSS, but it would be easier to inherit the styles of complex buttons with hover/focus states by adding existing classes. |
|
Hi there, For most buttons we don’t have a filter for the classes, however, can you let me know which specific button you are referring to so I can double please? |
|
1. The “Register Now” button whose default markup is as follows: 2. The “Proceed to Payment Options” button whose default markup is as follows: 3. The “Proceed to Finalize Regitration” button whose default markup is as follows: I was to add “btn btn-primary” classes to all 3 buttons. Is this possible with EE filters? |
|
It’s possible with the latter two, but it’s not necessarily an easy task or recommended to use the specific plugin’s filters to add a few html classes there. Here’s a link to the filter within the context of its code: A simpler approach could make use of the_content filter and conditionally apply that filter only to the pages that have those buttons. e.g.
|
|
The support post ‘Filter for changed button classes’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.