Title: Adding class to shortcode
Last modified: August 5, 2021

---

# Adding class to shortcode

 *  [mpc2474](https://wordpress.org/support/users/mpc2474/)
 * (@mpc2474)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/adding-class-to-shortcode-2/)
 * Our company had an external source create a custom search tool for our website.
   I insert the tool into our header using the following shortcode:
 * [md_filter shop-page-slug=”test-search” theme-light-mode=”true”]
    [md_part_number_search
   shop-page-slug=”test-search” theme-light-mode=”true”]
 * But the tool needs some styling before we feel comfortable launching it, because
   it currently displays pretty unattractively. I would like to add a class somewhere
   in the shortcode so that I can adjust CSS, or otherwise find an alternative means
   to style this so that we can implement it, but I’m a bit out of my depth. Is 
   it possible to change the appearance of the tool this shortcode generates?

Viewing 1 replies (of 1 total)

 *  Plugin Author [shazdeh](https://wordpress.org/support/users/shazdeh/)
 * (@shazdeh)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/adding-class-to-shortcode-2/#post-14743685)
 * If you’re using the Widget Shortcode plugin, you can use the “container_class”
   parameter to add a custom classname to the widget on frontend, so for example:
 *     ```
       [widget id="text-1" container_class="my-widget"]
       ```
   
 * Will display the widget with the specified ID, and adds “my-widget” CSS classname
   to it.
 * Hope this helps!

Viewing 1 replies (of 1 total)

The topic ‘Adding class to shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-shortcode.svg)
 * [Widget Shortcode](https://wordpress.org/plugins/widget-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/widget-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-shortcode/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [shazdeh](https://wordpress.org/support/users/shazdeh/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/adding-class-to-shortcode-2/#post-14743685)
 * Status: not resolved