• will

    (@asecondwill)


    WP – 3.0-RC3-15257

    Hi I have made some post types with capability type “page” and supports page-attributes switched on. I get a metabox for attributes, but just with “order”. No template selector shows up.

    that’s because of this:

    http://core.trac.wordpress.org/changeset/14642

    Isn’t template selecting part of the page type capabilities? Why have they been excluded like that? Is this a bug?

    Thanks

    Will

Viewing 3 replies - 1 through 3 (of 3 total)
  • i see the same problem.. has anybody managed to resolve this?

    ok i just managed to resolve this..

    there is a file meta-boxes.php within wp-admin\includes of the wordpress installation.. line 547 of the file, which is the function page_attributes_meta_box() just add the check for your particular post type name to be able to display the template pages drop down.

    if ( ('page' == $post->post_type  || 'yourcustomposttype' == $post->post_type) && 0 != count( get_page_templates() ) ) {
    		$template = !empty($post->page_template) ? $post->page_template : false;
    		?>

    jsims281

    (@jsims281)

    mayG, that’s fantastic. It works for displaying the drop down list but (for me at least), it won’t save the data.

    The data in “parent” saves fine but the template always just goes back to default…any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘page template dropdown for post types other than ‘page’’ is closed to new replies.