WordPress - Featured-Image-Meta-Box zeigt nicht auf custom-post-Typ

Ich gerade erstellt eine benutzerdefinierte post-Typ, aber aus irgendeinem Grund, das Featured Image meta-Feld nicht angezeigt.

Tut es zeigen Sie auf den "Beiträge" - post-Typ, obwohl.

Habe ich aktiviert theme-support für die Vorschaubilder und habe folgenden code in meinem custom post type code.

<?php

function register_cpt_product() {

    $labels = array( 
        'name' => _x( 'Products', 'product' ),
        'singular_name' => _x( 'Product', 'product' ),
        'add_new' => _x( 'Add New', 'product' ),
        'add_new_item' => _x( 'Add New Product', 'product' ),
        'edit_item' => _x( 'Edit Product', 'product' ),
        'new_item' => _x( 'New Product', 'product' ),
        'view_item' => _x( 'View Product', 'product' ),
        'search_items' => _x( 'Search Products', 'product' ),
        'not_found' => _x( 'No products found', 'product' ),
        'not_found_in_trash' => _x( 'No products found in Trash', 'product' ),
        'parent_item_colon' => _x( 'Parent Product:', 'product' ),
        'menu_name' => _x( 'Products', 'product' ),
    );

    $args = array( 
        'labels' => $labels,
        'hierarchical' => false,
        'description' => 'Allows the user to create products',
        'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ),
        'public' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        'show_in_nav_menus' => true,
        'publicly_queryable' => true,
        'exclude_from_search' => false,
        'has_archive' => true,
        'query_var' => true,
        'can_export' => true,
        'rewrite' => true,
        'capability_type' => 'post'
    );

    register_post_type( 'product', $args );
}

add_action( 'init', 'register_cpt_product' );

?>

Komisch ist, dass auf den Seiten, die Listen meine Einträge für meine post-Typ, gibt es eine Spalte namens Thumbnail.

Wordpress - Featured-Image-Meta-Box zeigt nicht auf custom-post-Typ

Jemand wissen, was Los ist?

Dank

InformationsquelleAutor Ashley Staggs | 2012-10-25

Schreibe einen Kommentar