Title: Button Link
Last modified: August 31, 2016

---

# Button Link

 *  [hbean1](https://wordpress.org/support/users/hbean1/)
 * (@hbean1)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/button-link-7/)
 * I recently activated a new theme and my buttons from the current theme no longer
   work. [button link=”/inspections-form/”]Schedule an Inspection Today[/button]
   How do I get this form to open up in a new page again and be shown as a button?
   Is there a different button code for this theme?
 * Thanks for the help!

Viewing 1 replies (of 1 total)

 *  Theme Author [TT Themes](https://wordpress.org/support/users/tomastoman/)
 * (@tomastoman)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/button-link-7/#post-7204676)
 * Hi,
 * free themes hosted on wordpress.org are not allowed to include custom shortcodes
   since it is considered as a [plugin-territory functionality](https://make.wordpress.org/themes/handbook/guidelines/plugin-territory/)
   according to the latest guidelines. You will need to create a child theme and
   add the “button” shortcode through “functions.php”. Here is an example how the
   code can look:
 *     ```
       function happenstance_button_shortcode($atts, $content = null) {
          extract(shortcode_atts(array('link' => '#'), $atts));
          return '<a class="custom-button" href="'.$link.'">' . do_shortcode($content) . '</a>';
       }
       add_shortcode( 'button', 'happenstance_button_shortcode' );
       add_filter('widget_text', 'do_shortcode');
       ```
   
 * Or you can use a shortcode plugin, for example the [Shortcodes Ultimate](https://wordpress.org/plugins/shortcodes-ultimate/).
   If you plan to frequently switch between various themes, it is the best solution,
   because shortcodes provided by a plugin are not dependent on any theme.
 * Best regards,
    Tomas Toman

Viewing 1 replies (of 1 total)

The topic ‘Button Link’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/happenstance/3.0.1/screenshot.
   png)
 * HappenStance
 * [Support Threads](https://wordpress.org/support/theme/happenstance/)
 * [Active Topics](https://wordpress.org/support/theme/happenstance/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/happenstance/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/happenstance/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [TT Themes](https://wordpress.org/support/users/tomastoman/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/button-link-7/#post-7204676)
 * Status: not resolved