i want to create a shortcode functions that creates various buttons…
in my shortcode tag, i specify the properties that i want like bg-color, size, and … like this:

[my-btn size="small" bg-color="#002861" border-radius="2"]click me[/my-btn]

in my shortcode function how i can apply these styles to my btn.
for example user enter background red for button. how i can apply red background and return button…
or i have 2 size of buttons: small or big. how i can set width: 100px for small and 200px for big?

Read more here: how to create a button maker with wordpress shortcode


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: