WordPress.org

Ready to get started?Download WordPress

Forums

Add Button with HTML rather than Shortcode (2 posts)

  1. dvent
    Member
    Posted 2 years ago #

    Hi All,

    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?

    Thanks
    dvent

  2. Gary Darling
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic