Title: Adding additional class to a block
Last modified: September 4, 2019

---

# Adding additional class to a block

 *  Resolved [sclkfxcite](https://wordpress.org/support/users/sclkfxcite/)
 * (@sclkfxcite)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-additional-class-to-a-block/)
 * I created a custom block via the plugin UI that acts as a case study link
 * I’m trying to give a custom block a bootstrap class, but adding the class to 
   the ‘additional CSS class’ field on the page editor does not add the class to
   the block. Do you have a way around this?
 * Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-additional-class-to-a-block%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-additional-class-to-a-block/#post-11896677)
 * Hi [@sclkfxcite](https://wordpress.org/support/users/sclkfxcite/),
    Thanks for
   bringing this up.
 * Adding an additional class in the ‘Additional CSS Class(es)’ `<input>`:
 * [https://cldup.com/dS9OTg1qsL.png](https://cldup.com/dS9OTg1qsL.png)
 * …should make it available when calling `block_field( 'className' )` in the template.
 * Is that not working?
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-additional-class-to-a-block/#post-11896680)
 * Your site looks great! Really nice design.
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-additional-class-to-a-block/#post-11901221)
 * Feel free to comment here if the issue still exists, but I’m going to mark this
   as ‘resolved’ for now, if that’s alright.
 *  Thread Starter [sclkfxcite](https://wordpress.org/support/users/sclkfxcite/)
 * (@sclkfxcite)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-additional-class-to-a-block/#post-11901226)
 * I’m sorry but I’m not sure where I’m supposed to enter block_field(‘className’).
   Is that under Block Properties > Slug?
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/adding-additional-class-to-a-block/#post-11902124)
 * Hi [@sclkfxcite](https://wordpress.org/support/users/sclkfxcite/),
    `block_field('
   className' )` would go in a PHP template for the block.
 * Here’s a document on templates:
    [https://github.com/getblocklab/block-lab/wiki/3.-Displaying-custom-blocks](https://github.com/getblocklab/block-lab/wiki/3.-Displaying-custom-blocks)

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

The topic ‘Adding additional class to a block’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/block-lab_5c34e8.svg)
 * [Block Lab](https://wordpress.org/plugins/block-lab/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/block-lab/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/block-lab/)
 * [Active Topics](https://wordpress.org/support/plugin/block-lab/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/block-lab/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/block-lab/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/adding-additional-class-to-a-block/#post-11902124)
 * Status: resolved