• I’m using types to create custom post types but once created, they don’t pick up the post options where a layout and sidebar can be chosen.

    The theme post options currently only display in the default posts and pages screen.

    how would i enable the options to display in CPT?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Anonymous User 7842110

    (@anonymized-7842110)

    Hi, This is probably down to declaring support for these options in your functions.php file.

    Can you post the code from your functions.php file that you have used to create the Custom Post Type? It will have something like this in it …

    'supports' => array( 'title', 'editor' ),

    Thread Starter jelfs01mi

    (@jelfs01mi)

    Hi, I created the CPT using the types plugin, so didn’t touch the functions.php?

    Thread Starter jelfs01mi

    (@jelfs01mi)

    If it helps, then i could add it manually. I would then just need to know what to add to the ‘supports’ => array( ‘title’, ‘editor’ ) for it to load the themes post options

    Thread Starter jelfs01mi

    (@jelfs01mi)

    Hi,

    I’ve managed to figure out how to add the themes post options to a custom post type.
    Here’s how.

    Create the new custom post, either via a plugin like types, which i used, or code it manually via functions.php in the normal way.

    Once created

    Go to hueman\functions\meta-boxes.php
    Find: $post_options = array(
    Then just below that look for: ‘pages’ => array( ‘post’ ),

    Where it says ‘post’ add the slug name of your new custom post.
    So if i had a new custom post called ‘books’ with a slug of ‘book’ it would look like:

    ‘pages’ => array( ‘post’,’book’ ),

    You just need to add the slug for each CPT you create. (if you want the post options to show.

    Thanks and hope it helps someone. ??

    Anonymous User 7842110

    (@anonymized-7842110)

    Good work! Very handy to know.

    It had me stumped for a while there :/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CPT theme options’ is closed to new replies.