Support » Fixing WordPress » Add Button with HTML rather than Shortcode
5 years, 1 month ago
In my theme, it is possible to add a button using a shortcode:
[button color=”#COLOR_CODE” background=”#COLOR_CODE” size=”medium” src=”PLACE_LINK_HERE”]ADD_BUTTON_CONTENT[/button]
When I enter this as a shortcode in some areas it does not work. How do I add the same thing as pure HTML to see if that works? Which file within the theme to I look at to work out the div class etc?
<button type="button">Click Me!</button>
Which template file you put it in depends on the type of page you want it on. Look at the Codex to determine which file it should go in.
As far as choosing a div, use your browser’s Developer Tools to view the html structure, this will help you find the right place to put it.