Title: Custom Post Types
Last modified: August 21, 2016

---

# Custom Post Types

 *  Resolved [Crystal C](https://wordpress.org/support/users/cryscee/)
 * (@cryscee)
 * [12 years ago](https://wordpress.org/support/topic/custom-post-types-138/)
 * I created a custom post type, and I can’t get MAB to show for it.
 * I tried the steps in this thread: [http://wordpress.org/support/topic/mab-not-appearing-in-custom-post-type](http://wordpress.org/support/topic/mab-not-appearing-in-custom-post-type)
 * but when I copy that code and add it to my functions.php (and change the ‘post-
   type’ to match mine) it “breaks” the site. The site won’t load and I have to 
   use FTP to undo the change.
 * Thanks
 * [https://wordpress.org/plugins/magic-action-box/](https://wordpress.org/plugins/magic-action-box/)

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

 *  Plugin Author [Ryann Micua](https://wordpress.org/support/users/pogidude/)
 * (@pogidude)
 * [12 years ago](https://wordpress.org/support/topic/custom-post-types-138/#post-4850451)
 * Hi [@cryscee](https://wordpress.org/support/users/cryscee/), the code posted 
   in the solved thread is as good as it gets. it’s the same solution I’d prescribe
   for you. make sure you copied the code correctly.
 * If the site “breaks”, are there any error messages that show up? and in your 
   functions.php file, what’s the last 10 lines of code in the file before you pasted
   in the new code from the other thread? I assume you pasted in the new code at
   the end of the file.
 *  Thread Starter [Crystal C](https://wordpress.org/support/users/cryscee/)
 * (@cryscee)
 * [12 years ago](https://wordpress.org/support/topic/custom-post-types-138/#post-4850670)
 * Yes, I am posting the code at the bottom of the functions file. And no, no errors
   display. The site just brings up a blank white page. Then when I go in and remove
   what I added it loads correctly.
 * This is what I’m pasting:
 * add_filter(‘mab_allowed_post_types’, ‘add_cpt_to_mab’);
    add_cpt_to_mab($posttypes){
   $posttypes[] = ‘the_video’; return $posttypes; }
 * Thanks!
 *  Plugin Author [Ryann Micua](https://wordpress.org/support/users/pogidude/)
 * (@pogidude)
 * [12 years ago](https://wordpress.org/support/topic/custom-post-types-138/#post-4850671)
 * I guess you’re right, the original thread had something missing but the poster
   saw the error and didnt bother correcting me. Anyhow, here’s what it should look
   like
 *     ```
       add_filter('mab_allowed_post_types', 'add_cpt_to_mab');
       function add_cpt_to_mab($posttypes){
       $posttypes[] = 'the_video';
       return $posttypes;
       }
       ```
   
 *  Thread Starter [Crystal C](https://wordpress.org/support/users/cryscee/)
 * (@cryscee)
 * [12 years ago](https://wordpress.org/support/topic/custom-post-types-138/#post-4850680)
 * Worked perfectly! Thanks.

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

The topic ‘Custom Post Types’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/magic-action-box_318aa7.svg)
 * [Magic Action Box](https://wordpress.org/plugins/magic-action-box/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/magic-action-box/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/magic-action-box/)
 * [Active Topics](https://wordpress.org/support/plugin/magic-action-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/magic-action-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/magic-action-box/reviews/)

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * 4 replies
 * 2 participants
 * Last reply from: [Crystal C](https://wordpress.org/support/users/cryscee/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/custom-post-types-138/#post-4850680)
 * Status: resolved