Title: Add &#039;class&#039; shortcode attribute to all shortcodes
Last modified: August 30, 2016

---

# Add 'class' shortcode attribute to all shortcodes

 *  Resolved [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/add-class-shortcode-attribute-to-all-shortcodes/)
 * This plugin was just what I was looking for, especially that it has no styling(
   and if styling is added that it should be able to be disabled). However, I think
   it’d be helpful to be able to add a `class` to each output.
 * For example:
    - `[SCF-POST-ID]` returns `241` (I love that it’s “clean” output)
    - and
    - `[SCF-POST-ID class="myclass other_class"]` would return something like `<
      span class="myclass other_class">241</span>`
    - another idea would be to add the shortcode name as a class too: `[SCF-POST-
      ID class="scf-post-id myclass other_class"]` would return something like `
      <span class="myclass other_class">241</span>`
 * Just a thought.
 * Thanks again for this plugin!
 * [https://wordpress.org/plugins/shortcode-factory/](https://wordpress.org/plugins/shortcode-factory/)

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

 *  Plugin Author [WPMadeasy](https://wordpress.org/support/users/wpmadeasy/)
 * (@wpmadeasy)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/add-class-shortcode-attribute-to-all-shortcodes/#post-6432370)
 * Thank you for your feedback.
 * You are absolutely right, there should be output options.
 * In fact, we are working to bring some exciting Bootstrap things via short codes
   at hand. And for the same thing, we are also adding some output options to existing
   short codes (i.e. Output tag type, CSS ID/Class).
 * Just a little wait and it will be out soon.
 * Thank you once again for your invaluable suggestion 🙂
 *  Thread Starter [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/add-class-shortcode-attribute-to-all-shortcodes/#post-6432397)
 * I’m really hoping this plugin stays light and clean (i.e. NOT bootstrap stuff).
   There’s no need, IMHO, to add columns, buttons, styling, etc from Bootstrap for
   a plugin that simply outputs a post ID, custom field value, and the like.
 * Don’t get me wrong. It’s your plugin and you can go the direction you choose,
   but _my preference_ is to be kept light and clean (i.e. not loading additional
   CSS or JS files).
 *  Plugin Author [WPMadeasy](https://wordpress.org/support/users/wpmadeasy/)
 * (@wpmadeasy)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/add-class-shortcode-attribute-to-all-shortcodes/#post-6432401)
 * Your opinion is of a great worth – noted with thanks.
 * We are trying to make the plugin as much lighter as possible – so the only required
   piece of code is executed. There’s still much room available on this side of 
   improvement, and hopefully you will find it much better every time, in upcoming
   versions.
 * As far as 3rd party based features are concerned, we are trying to make the plugin
   configurable around these. We understand that people may not require all of the
   features from such a plugin, they should be able to turn off unwanted features.
 *  Thread Starter [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/add-class-shortcode-attribute-to-all-shortcodes/#post-6432402)
 * tyvm for the feedback and for valuing my input. Good luck with it.
 *  Plugin Author [WPMadeasy](https://wordpress.org/support/users/wpmadeasy/)
 * (@wpmadeasy)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/add-class-shortcode-attribute-to-all-shortcodes/#post-6432403)
 * Cheers 🙂
 *  Plugin Author [WPMadeasy](https://wordpress.org/support/users/wpmadeasy/)
 * (@wpmadeasy)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/add-class-shortcode-attribute-to-all-shortcodes/#post-6432601)
 * Hi Clifford,
 * We have just released version 1.5 of the plugin and glad to tell you that your
   suggestion has been implemented.
 * Now you can use 2 new attributes with the short codes:
    - output: you can define an HTML tag to wrap the output of the short code in
      the tag. For example output=”p” will wrap the output in a paragraph tag.
    - class: you can add CSS class to the output tag – default is the name of the
      short code.
 * I hope you will find these changes more useful. Once again, thank you very much
   for your great suggestion and support.
 * By the way, we haven’t yet released changes about Bootstrap, we are still in 
   a process to bring these features, as a pleasure to the plugin – rather an annoying
   thing. That’s why it’s taking some time.
 * But of course, the new parameters will bring some happiness 😉
 * Best regards.

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

The topic ‘Add 'class' shortcode attribute to all shortcodes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shortcode-factory_c7c7c7.svg)
 * [Shortcode Factory](https://wordpress.org/plugins/shortcode-factory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcode-factory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcode-factory/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcode-factory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcode-factory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcode-factory/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [WPMadeasy](https://wordpress.org/support/users/wpmadeasy/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/add-class-shortcode-attribute-to-all-shortcodes/#post-6432601)
 * Status: resolved