Title: Using post type as a CSS class
Last modified: October 12, 2016

---

# Using post type as a CSS class

 *  [oolong99](https://wordpress.org/support/users/oolong99/)
 * (@oolong99)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/using-post-type-as-a-css-class/)
 * Is it possible to display the post type as text as a css class:
 * [loop type=post,events count=5]
    [link] <div class=”news-title [POST-TYPE] “>
   <p class=”centre-align”>[field title]</p> </div> [/link] [/loop]

Viewing 1 replies (of 1 total)

 *  [Peter Berger](https://wordpress.org/support/users/peterpolow/)
 * (@peterpolow)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/using-post-type-as-a-css-class/#post-8294032)
 * See the Field reference (page “Custom Content” under “Settings”):
 * >  post-type – post type
   >  post-type-name – singular label post-type-plural – 
   > plural label
 * Use: `[field post-type]`
    -  This reply was modified 9 years, 8 months ago by [Peter Berger](https://wordpress.org/support/users/peterpolow/).

Viewing 1 replies (of 1 total)

The topic ‘Using post type as a CSS 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: [Peter Berger](https://wordpress.org/support/users/peterpolow/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/using-post-type-as-a-css-class/#post-8294032)
 * Status: not resolved