Title: Adding post_class to Custom Post Type
Last modified: August 2, 2022

---

# Adding post_class to Custom Post Type

 *  Resolved [alejandro.moreno.mvd](https://wordpress.org/support/users/alejandromorenomvd/)
 * (@alejandromorenomvd)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/adding-post_class-to-custom-post-type/)
 * Is there any way to hook to add the standard `post_class()` to the Custom Post
   Type block class?
    Would be great if that will include it (maybe using a switch
   field to enable/disable), and additionally render with `<article>` instead of`
   <div>`.

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

 *  Plugin Support [Eugene White](https://wordpress.org/support/users/eugenewhite/)
 * (@eugenewhite)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/adding-post_class-to-custom-post-type/#post-15887398)
 * Hello there!
 * I sure get what you’re trying to complete, but at this moment there’s no way 
   to add the standard post_class to the Custom Post Type block, unfortunately. 
   But if we collect more similar requests from other customers, our developers 
   definitely consider such implementation in one of the future plugin releases.
   We let you know if we receive any updates on this matter.
 *  Plugin Support [Eugene White](https://wordpress.org/support/users/eugenewhite/)
 * (@eugenewhite)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/adding-post_class-to-custom-post-type/#post-15982979)
 * Hello there!
 * I hope you’re doing well.
    I haven’t received a response from you and will mark
   this topic as resolved. In case you have any questions, feel free to create a
   new one.

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

The topic ‘Adding post_class to Custom Post Type’ is closed to new replies.

 * ![](https://ps.w.org/getwid/assets/icon.svg?rev=2238400)
 * [Getwid - Gutenberg Blocks](https://wordpress.org/plugins/getwid/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/getwid/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/getwid/)
 * [Active Topics](https://wordpress.org/support/plugin/getwid/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/getwid/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/getwid/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Eugene White](https://wordpress.org/support/users/eugenewhite/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/adding-post_class-to-custom-post-type/#post-15982979)
 * Status: resolved