Need help? Check out our Support site, then


Need Help Custom Post type not showing extra boxes in editor

  1. Hello I created the following custom post type but the meta boxes are not showing up. Can someone help me out?

    Code im using:

    <?php

    // REGISTER CUTOM POST TYPE
    function cl_create_post_type() {
    $labels = array(
    'name' => __( 'Events', 'cl' ),
    'singular_name' => __( 'event', 'cl' ),
    'add_new' => __( 'New event', 'cl' ),
    'add_new_item' => __( 'Add New event', 'cl' ),
    'edit_item' => __( 'Edit event', 'cl' ),
    'new_item' => __( 'New event', 'cl' ),
    'view_item' => __( 'View event', 'cl' ),
    'search_items' => __( 'Search events', 'cl' ),
    'not_found' => __( 'No Events Found', 'cl' ),
    'not_found_in_trash' => __( 'No Events found in trach', 'cl' ),
    );

    //DEFINE WHATS NEEDED IN THE EDITOR
    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => true,
    'has_archive' => true,
    'supports' => array(
    'title',
    'editor',
    'thumbnail',
    'excerpt'),//END OF ARRAY
    'rewrite' => array(
    'slug' => 'events',
    'with_front' => false ),
    'taxonomies' => array(
    'post_tag',
    'category')//END OF ARRAY
    );// END OF ARGS ARRAY

    register_post_type( 'event' , $args );

    }// END OF CL_CREATE_POST_TYPE

    add_action( 'init', 'cl_create_post_type' );

    function cl_create_event_meta_box() {
    add_meta_box(
    'cl_event_metabox', 'Event Option Boxes', 'cl_create_event_metabox', 'events', 'normal', 'high' );
    }//END OF EVENT MANAGER ADD META FUNCTION

    function cl_event_metabox( $post ) {
    echo 'Yeah baby';
    }

    add_action( 'add_meta_boxes' , 'cl_create_event_meta_box' );

    ?>

    The blog I need help with is jsnarroyo.wordpress.com.

  2. I don't believe that you can edit php on a WordPress.com site. If you purchase the Custom Design upgrade, you can edit the CSS.

    A custom post type would only be possible in a WordPress.org install. You would need to acquire hosting (from bluehost.com or similar webhost) and set up WordPress.org software.
    http://wordpress.org/download/

  3. If by chance you are talking about a self-hosted WordPress install, you'll need to seek help over at http://wordpress.org/support/ These are the forums for WordPress.com, the hosted version.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.