Title: Codeblocks with custom post types?
Last modified: August 21, 2016

---

# Codeblocks with custom post types?

 *  Resolved [Jake Jackson](https://wordpress.org/support/users/blue-liquid-designs/)
 * (@blue-liquid-designs)
 * [12 years ago](https://wordpress.org/support/topic/codeblocks-with-custom-post-types/)
 * Hi,
 * The plugin works really well on standard posts and pages but I couldn’t get it
   to work on my custom post type. Will you support this in future?
 * [https://wordpress.org/plugins/codeblocks/](https://wordpress.org/plugins/codeblocks/)

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

 *  Thread Starter [Jake Jackson](https://wordpress.org/support/users/blue-liquid-designs/)
 * (@blue-liquid-designs)
 * [12 years ago](https://wordpress.org/support/topic/codeblocks-with-custom-post-types/#post-4977183)
 * I narrowed down the problem to line 191 of the /acf/core/controllers/post.php
   file:
 * `$show = in_array( $acf['id'], $metabox_ids ) ? 1 : 0;`
 * If I override this boolean and set it to ‘1’ for everything then the meta box
   shows correctly on my custom post type.
 *  Plugin Author [Hank Brekke](https://wordpress.org/support/users/z43-studio/)
 * (@z43-studio)
 * [12 years ago](https://wordpress.org/support/topic/codeblocks-with-custom-post-types/#post-4977238)
 * Currently the Codeblocks plugin uses the [Advanced Custom Fields](http://www.advancedcustomfields.com)
   plugin to insert it’s meta box in the post editor.
 * While your method works for removing the filter to strictly `post` and `page`
   type posts, the more practical way to remove this filter is to remove the `location`
   array of `/acf-group.php` directly inside the plugin (line 16).
 * I will likely remove this restriction in a future release, after I have tested
   Codeblocks with more custom post types.
 *  Thread Starter [Jake Jackson](https://wordpress.org/support/users/blue-liquid-designs/)
 * (@blue-liquid-designs)
 * [12 years ago](https://wordpress.org/support/topic/codeblocks-with-custom-post-types/#post-4977251)
 * Thanks for the information.
 * I’m now using the plugin on a custom post type and have had no problems with 
   its functionality.

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

The topic ‘Codeblocks with custom post types?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/codeblocks.svg)
 * [Codeblocks](https://wordpress.org/plugins/codeblocks/)
 * [Support Threads](https://wordpress.org/support/plugin/codeblocks/)
 * [Active Topics](https://wordpress.org/support/plugin/codeblocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/codeblocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/codeblocks/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jake Jackson](https://wordpress.org/support/users/blue-liquid-designs/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/codeblocks-with-custom-post-types/#post-4977251)
 * Status: resolved