Title: Shortcode Button as Trigger
Last modified: August 22, 2016

---

# Shortcode Button as Trigger

 *  Resolved [radar_gb](https://wordpress.org/support/users/radar_gb/)
 * (@radar_gb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/)
 * I want to swap default arrow with the shortode button build in my theme. Is it
   possible? Could use image but i really enjoy button animation.
 * [https://wordpress.org/plugins/jquery-collapse-o-matic/](https://wordpress.org/plugins/jquery-collapse-o-matic/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/#post-5871073)
 * Did you do a search before asking your question?
    [https://wordpress.org/search/collapse-o-matic+arrows?forums=1](https://wordpress.org/search/collapse-o-matic+arrows?forums=1)
   [http://spacedonkey.de/1578/collapse-o-pro-matic-css-tricks-arrows/](http://spacedonkey.de/1578/collapse-o-pro-matic-css-tricks-arrows/)
 *  Thread Starter [radar_gb](https://wordpress.org/support/users/radar_gb/)
 * (@radar_gb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/#post-5871081)
 * Yes i did, but the thing is that i dont want to use standard image as trigger
   but shordcode build in to my theme.
    For example: [button style=”simple” size
   =”small” color=”black” icon=”none” radius=”0px” url=”[http://www.visitsite.com&#8221](http://www.visitsite.com&#8221);
   title=”Visit Site” target=”blank”]Sample Content[/button]
 * This is the shortcode i would like to use as a trigger.
 * I’ve tried many times and cant get this to work.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/#post-5871103)
 * are you able to assign a class to the button?
    is this shortcode part of your
   theme, or plugin? can you share a link to your site?
 *  Thread Starter [radar_gb](https://wordpress.org/support/users/radar_gb/)
 * (@radar_gb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/#post-5871128)
 * The button is customizable and i cant use standard class to make it work.
 * I’ve also tried solution from post i found:
 *     ```
       <div id="wiecej" class="collapseomatic">[button style="inner" size="small" color="#ffffff" icon="none" radius="0px"]WIĘCEJ[/button]</div>
   
       <div id="target-wiecej" class="collapseomatic_content">Sample content</div>
       ```
   
 * Which gives me shortcode button, but it doesnt work as a trigger.
 * Temporary url of the site:
    [http://www.wefixit.com.pl](http://www.wefixit.com.pl)
 * Im sorry, but texts are in polish.
    You can have a look at button ‘WIECEJ’ (which
   has standard picture set as a trigger at the moment) There is feedback form at
   the bottom and animated button ‘WYSLIJ’ – thats the one i would like to use as
   a trigger.
 * Thanks in advance!!
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/#post-5871139)
 * OK.
    The theme you are using is [Malibu](http://www.themetonic.net/malibu/). 
   Since it is a pro theme, it must come with documentation on the shortcodes.
 * We posted a question on the support thread here:
    [http://themeforest.net/item/malibu-one-page-lounge-bar-cafe-resto-wp-theme/8332937/comments?page=3&filter=all#comment_9373393](http://themeforest.net/item/malibu-one-page-lounge-bar-cafe-resto-wp-theme/8332937/comments?page=3&filter=all#comment_9373393)
 * The only way you can get the button shortcode to act as a triger is if you can
   a) assign a class and b) assign an id. The only other option you might have is
   to NOT use the shortcode and roll-your-own button.
 * For example:
 *     ```
       <div class="status">
           <button id="button-974" class="button inner small submit collapseomatic noarrow" data-color="#282828">Wyślij</button>
       </div>
       <div id="target-button-974" class="collapseomatic_content">Sample content</div>
       ```
   
 *  Thread Starter [radar_gb](https://wordpress.org/support/users/radar_gb/)
 * (@radar_gb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/#post-5871184)
 * Hey!
    Ive emailed theme developers and thats what they answered:
 * >  if you want to use Collapse-o-Matic and want to create a button to trigger
   > it, you can add a button shortcode with extra “class” option, like this below:
   > [button style=”simple” size=”large” color=”#ACD968″ icon=”none” radius=”0px”
   > url=”#” target=”self” class=”your_trigger_class_name”]Button[/button]
   > Then you can add JavaScript for triggering using button with extra class.
 * Does it make any difference?
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/#post-5871185)
 * yes! that is exactly what
 * > are you able to assign a class to the button?
 * was asking way up at the top of this thread.
 * Now can you assign an ID as well?
 * Try this:
 *     ```
       [button style="simple" size="large" color="#ACD968" icon="none" radius="0px" url="#" target="self" id="my_test_button"  class="collapseomatic noarrow"]Button[/button]
   
       <div id="target-my_test_button" class="collapseomatic_content">Sample content</div>
       ```
   

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Shortcode Button as Trigger’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jquery-collapse-o-matic_fffeff.svg)
 * [Collapse-O-Matic](https://wordpress.org/plugins/jquery-collapse-o-matic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jquery-collapse-o-matic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jquery-collapse-o-matic/)
 * [Active Topics](https://wordpress.org/support/plugin/jquery-collapse-o-matic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jquery-collapse-o-matic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jquery-collapse-o-matic/reviews/)

## Tags

 * [arrow](https://wordpress.org/support/topic-tag/arrow/)
 * [css](https://wordpress.org/support/topic-tag/css/)

 * 7 replies
 * 2 participants
 * Last reply from: [Baden](https://wordpress.org/support/users/baden03/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/shortcode-button-as-trigger/#post-5871185)
 * Status: resolved