WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Types Have No TinyMCE Editor (2 posts)

  1. ajmcfadyen
    Member
    Posted 12 months ago #

    Hi Folks!

    There are no content-editors on the custom post types of a site I am working on.

    I'm hoping someone can shed some light on what could be causing this.

    I have tried manually setting 'editor' => true on the post types.

    I have tried removing everything from functions.php except the post types, disabling all plugins, and removing wp-alchemy.

    I have tried adding a new custom post type after removing all plugins & functions.

    The WordPress-core has not been edited.

    Thanks in Advance!

  2. ajmcfadyen
    Member
    Posted 12 months ago #

    Fixed!
    Replaced this:

    function register_testimonials(){
     	$labels = array(
    		'name' => "Testimonials",
    		'singular_name' => "Testimonial",
    		'add_new' => "Add New",
    		'add_new_item' => "Add New",
    		'edit_item' => "Edit Testimonial",
    		'search_items' => "Search Testimonials"
    	);
    	$args = array(
     		'labels' => $labels,
    		'description' => "Testimonials",
    		'menu_position' => 10,
    		'public' => true,
     		'hierarchical' => true,
    		'rewrite' => array("slug" => "testimonial", 'with_front' => true),
     		'supports' => array(
     			'title',
     		 	'_custom_meta'
     		)
    	);
    	register_post_type('testimonial', $args);
    }
    add_action('init', 'register_testimonials', 10, 2);

    With this:

    register_post_type( 'my_testimonial',
        array(
            'labels'                => array(
                'name'              => __( 'Testimonials' ),
                'singular_name'     => __( 'Testimonial' )
                ),
            'public'                => true,
            'show_ui'               => true,
    		'supports'              => array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail' ),
            'rewrite'               => array( 'slug' => 'testimonial', 'with_front' => false ),
    		'has_archive'           => true,
    		'show_in_nav_menus'     => true,
    		'taxonomies' 			=> array('category', 'post_tag')
        )
    );

Reply

You must log in to post.

About this Topic