WordPress.org

Ready to get started?Download WordPress

Forums

WP 3.5 Custom pages not saving custom templates (1 post)

  1. asanti82
    Member
    Posted 1 year ago #

    I've created custom post-types in my functions.php when I go to the page and add new, I have the "page template" dropdown which gives me a choice to pick from for that page. But when I select it and save it returns to default template. Not sure how to fix this, I've tried optimizing and reparing my DB as I read somewhere else, but nothing doing.

    register_post_type( 'mypage', array(
    		'labels' => array(
    			'name_admin_bar' => _x( 'Mypage', 'add new on admin bar' ),
    			'name' => __( 'Mypage' ),
    		),
    		'public' => true,
    		'publicly_queryable' => true,
    		'capability_type' => 'page',
    		'map_meta_cap' => true,
    		'hierarchical' => true,
    		'rewrite' => true,
    		'query_var' => true,
    		'has_archive' => true,
    		//'delete_with_user' => true,
    		'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions' ),
    	) );

Topic Closed

This topic has been closed to new replies.

About this Topic