Title: Adding CSS ID or Class to target shortcode output
Last modified: August 30, 2016

---

# Adding CSS ID or Class to target shortcode output

 *  [ywickham](https://wordpress.org/support/users/ywickham/)
 * (@ywickham)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-css-id-or-class-to-target-shortcode-output/)
 * Love this plugin. It’s the second time I’m using it on a website.
 * However, this time around I have an issue with the output. There are no classes
   or IDs wrapping the output for me to target the shortcode content. I realize 
   I can just switch to Text mode and add a wrapper for the shortcode content, but
   my client is not that tech savvy and will freak out if I tell them they have 
   to mess with any type of code.
 * Is there some snippet I can add to the functions.php that would add a class or
   an ID to the shortcode output… or some other solution, so I can target the output
   directly?
 * Thanks!
 * [https://wordpress.org/plugins/reusable-text-blocks/](https://wordpress.org/plugins/reusable-text-blocks/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [ywickham](https://wordpress.org/support/users/ywickham/)
 * (@ywickham)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-css-id-or-class-to-target-shortcode-output/#post-6196467)
 * I was able to get around this slightly by creating a template based on your instructions
   here:
 * [https://halgatewood.com/docs/plugins/reusable-text-blocks/creating-custom-templates-and-passing-variables](https://halgatewood.com/docs/plugins/reusable-text-blocks/creating-custom-templates-and-passing-variables)
 * But in order to not make the client add additional attributes to the shortcode(
   so they could just copy/paste what the plugin tells them to for the shortcode)
   I had to modify a few lines in your plugin. I’d prefer a different – better –
   solution if you have one. 🙂
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Adding CSS ID or Class to target shortcode output’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/reusable-text-blocks_53c8f2.svg)
 * [Reusable Text Blocks](https://wordpress.org/plugins/reusable-text-blocks/)
 * [Support Threads](https://wordpress.org/support/plugin/reusable-text-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/reusable-text-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reusable-text-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reusable-text-blocks/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [ywickham](https://wordpress.org/support/users/ywickham/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/adding-css-id-or-class-to-target-shortcode-output/#post-6196467)
 * Status: not resolved