Title: Display shortcode as a class
Last modified: August 31, 2016

---

# Display shortcode as a class

 *  [nkeebaugh](https://wordpress.org/support/users/nkeebaugh/)
 * (@nkeebaugh)
 * [10 years ago](https://wordpress.org/support/topic/display-shortcode-as-a-class/)
 * Hello there, I am trying to display a category slug of a post as a class within
   a loop. The slug displays everywhere else except for within a class. Anything
   I am doing wrong?
 * [loop type=client_activity taxonomy=client_account]
    [content taxonomy=category
   out=slug] <div class=”toggle simple-style mk-faq-toggle [content taxonomy=category
   out=slug]” style=”display: block;”> <span class=”toggle-title”>[content taxonomy
   =category out=slug] | [field due_date] | [field link_to_document]</span> <div
   class=”toggle-pane”> [field due_date] </div> </div> [/loop]
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [10 years ago](https://wordpress.org/support/topic/display-shortcode-as-a-class/#post-7419962)
 * If the same shortcode displays correctly but not in an HTML attribute, it sounds
   like the code is not within the normal post editor – are you using the code in
   a visual builder of some kind? It might be getting processed differently than
   normal post content.

Viewing 1 replies (of 1 total)

The topic ‘Display shortcode as a class’ is closed to new replies.

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

 * 1 reply
 * 2 participants
 * Last reply from: [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/display-shortcode-as-a-class/#post-7419962)
 * Status: not resolved