Title: Close button
Last modified: March 17, 2020

---

# Close button

 *  Resolved [Yogananda](https://wordpress.org/support/users/yogananda-puri/)
 * (@yogananda-puri)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/close-button-29/)
 * Hi,
 * Thanks for a great plugin !
 * I am trying to add a button to a box, that makes the box close upon press.
    I
   am using the Visual Composer, so the button code looks like this: [boxzilla-close][
   vc_button]OKAY[/vc_button][/boxzilla-close] This unfortunately doesn’t work, 
   can you tell me how to accomplish this.
 * Thanks,

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

 *  Thread Starter [Yogananda](https://wordpress.org/support/users/yogananda-puri/)
 * (@yogananda-puri)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/close-button-29/#post-12552392)
 * I also tried:
    `[vc_button][boxzilla-close]OKAY[/boxzilla-close][/vc_button]`
 * Please let me know if I can use the VC button, if not I guess I can make it a
   link and style it via css.
 *  Plugin Contributor [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/close-button-29/#post-12554523)
 * Hey [@yogananda-puri](https://wordpress.org/support/users/yogananda-puri/),
 * Please check this [https://kb.boxzillaplugin.com/showing-a-close-box-text-link/](https://kb.boxzillaplugin.com/showing-a-close-box-text-link/).
 * Are you adding that shortcode to our plugin or somewhere else?
 *  Thread Starter [Yogananda](https://wordpress.org/support/users/yogananda-puri/)
 * (@yogananda-puri)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/close-button-29/#post-12555551)
 * Hi and thanks for getting back to me !
 * I’m using the shortcode (from WPBakery Page Builder) in your plugin, added it
   to a box.
    It’s code for a button, that I’d like to use with the Boxzilla shortcode
   to close the popup box.
 * If this is possible, I’d prefer that, to the workaround I mentioned earlier.
 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/close-button-29/#post-12555879)
 * You can use `<a href="javascript:Boxzilla.hide(5);">Close box</a>`
 * Where 5 is the ID of the Boxzilla box.
 * So if you can fill a URL for the button you fill `javascript:Boxzilla.hide(5);`
   as link.
 * We don’t have any official integration with any page builder so for further support
   on this I recommend contacting the Page builder their support department.
 * Hope that helps. If you have any questions, please let me know!
 *  Thread Starter [Yogananda](https://wordpress.org/support/users/yogananda-puri/)
 * (@yogananda-puri)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/close-button-29/#post-12558281)
 * Hi
 * Thanks, the solution works fine.
 * Best regards
 *  [hpwd](https://wordpress.org/support/users/hpwd/)
 * (@hpwd)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/close-button-29/#post-12679210)
 * I tried this solution too but if you switch from the Visual editor to the Text
   editor, the JavaScript reference gets stripped out. What I’d like to do is modify
   the generated code of `<a href="Boxzilla.dismiss(555);">Dismiss</a>` such that
   it would produce `<a href="Boxzilla.dismiss(555);" class="boxzilla-buttonBlue"
   >Dismiss</a>`. For my use-case, the class could be hard coded in the plugin but
   I cannot find where I’d add this class.
    -  This reply was modified 6 years, 1 month ago by [hpwd](https://wordpress.org/support/users/hpwd/).
    -  This reply was modified 6 years, 1 month ago by [hpwd](https://wordpress.org/support/users/hpwd/).
 *  Plugin Contributor [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/close-button-29/#post-12680118)
 * [@hpwd](https://wordpress.org/support/users/hpwd/),
 * I would not recommend modifying the plugin directly. I’m aware that when switching
   between editing modes any JS code gets removed but right now there is no way 
   around it.

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

The topic ‘Close button’ is closed to new replies.

 * ![](https://ps.w.org/boxzilla/assets/icon-256x256.png?rev=1414640)
 * [Boxzilla - WordPress Popup Builder](https://wordpress.org/plugins/boxzilla/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/boxzilla/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/boxzilla/)
 * [Active Topics](https://wordpress.org/support/plugin/boxzilla/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/boxzilla/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/boxzilla/reviews/)

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)
 * [close](https://wordpress.org/support/topic-tag/close/)

 * 7 replies
 * 4 participants
 * Last reply from: [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/close-button-29/#post-12680118)
 * Status: resolved