• Howdy all. I just added a custom post type to my wordpress. Here’s the code (generated with GenerateWp.com)

    // Register Custom Post Type
    function custom_post_type() {

    $labels = array(
    ‘name’ => _x( ‘Logos’, ‘Post Type General Name’, ‘text_domain’ ),
    ‘singular_name’ => _x( ‘Logo’, ‘Post Type Singular Name’, ‘text_domain’ ),
    ‘menu_name’ => __( ‘Logo’, ‘text_domain’ ),
    ‘parent_item_colon’ => __( ‘Parent Logo:’, ‘text_domain’ ),
    ‘all_items’ => __( ‘All Logos’, ‘text_domain’ ),
    ‘view_item’ => __( ‘View Logo’, ‘text_domain’ ),
    ‘add_new_item’ => __( ‘Add New Logo’, ‘text_domain’ ),
    ‘add_new’ => __( ‘New Logo’, ‘text_domain’ ),
    ‘edit_item’ => __( ‘Edit Logo’, ‘text_domain’ ),
    ‘update_item’ => __( ‘Update Logo’, ‘text_domain’ ),
    ‘search_items’ => __( ‘Search Logo’, ‘text_domain’ ),
    ‘not_found’ => __( ‘No logos found’, ‘text_domain’ ),
    ‘not_found_in_trash’ => __( ‘No logos found in Trash’, ‘text_domain’ ),
    );
    $args = array(
    ‘label’ => __( ‘logo’, ‘text_domain’ ),
    ‘description’ => __( ‘Product information pages’, ‘text_domain’ ),
    ‘labels’ => $labels,
    ‘supports’ => array(‘thumbnail’, ‘title’),
    ‘taxonomies’ => array(),
    ‘hierarchical’ => false,
    ‘public’ => true,
    ‘show_ui’ => true,
    ‘show_in_menu’ => true,
    ‘show_in_nav_menus’ => true,
    ‘show_in_admin_bar’ => true,
    ‘menu_position’ => 5,
    ‘menu_icon’ => ”,
    ‘can_export’ => true,
    ‘has_archive’ => true,
    ‘exclude_from_search’ => false,
    ‘publicly_queryable’ => true,
    ‘capability_type’ => ‘page’,
    );
    register_post_type( ‘logo’, $args );

    }

    // Hook into the ‘init’ action
    add_action( ‘init’, ‘custom_post_type’, 0 );

    My problem is, after I upload and add a featured image to the post, the image isn’t displayed in the Featured Image Area, only after I hit the refresh button.

    That’s not the biggest problem – but after this step If I use the Update button from the post – the page turns blank.

    A little help please.

The topic ‘Post.php goes blank’ is closed to new replies.