• Hey Julien,
    Good work, but I wonder how to set Custom Post Types. Some screenshots I have seen make me think it should be possible. But I can’t chose any on my local installation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author shprink

    (@shprink)

    First of all sorry if I took 6 days to answer.. It seems that I do not receive any notification when someone add a post here..

    There is no specific behavior for custom post types in Shprinkone sorry. What is your need exactly?

    Try something like this:


    /*
    * Add custom post type for categories
    *
    * @return void
    */
    function codex_custom_menu_post_init() {
    $labels = array(
    'name' => 'Menu',
    'singular_name' => 'Menu',
    'add_new' => 'Add New',
    'add_new_item' => 'Add New Menu',
    'edit_item' => 'Edit Menu',
    'new_item' => 'New Menu',
    'all_items' => 'All Menu Items',
    'view_item' => 'View Menu',
    'search_items' => 'Search Menu',
    'not_found' => 'No menu found',
    'not_found_in_trash' => 'No menu found in Trash',
    'parent_item_colon' => '',
    'menu_name' => 'Menu'
    );
    $args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'show_in_menu' => true,
    'query_var' => true,
    'rewrite' => array( 'slug' => 'menu' ),
    'capability_type' => 'post',
    'has_archive' => true,
    'hierarchical' => false,
    'menu_position' => 5,
    'menu_icon' => "dashicons-editor-justify",
    'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields'/*, 'excerpt'*/),
    'taxonomies' => array( 'post_tag', 'category' )
    );
    register_post_type( 'menu', $args );
    }
    add_action( 'init', 'codex_custom_menu_post_init' );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Post Types?’ is closed to new replies.