WordPress.org

Ready to get started?Download WordPress

Forums

Missing Template Selection on Page Attributes in WordPress 3.3.2 (11 posts)

  1. photoJoe
    Member
    Posted 1 year ago #

    I have a custom theme, which placed an extra section in the admin left hand menu. When I added a page to this section it used to give me a chance to choose a custom theme. This option under page attributes has now disappeared.

    I have read the other suggestions re; getting your custom templates to show under page attributes, i.e;
    - install WordPress on a different server
    - unactivated the theme and reactivated it

    neither of these has solved my problem.

    Any ideas on what might have changed, & more importantly how i can fix this?

  2. Chip Bennett
    Theme Review Admin
    Posted 1 year ago #

    Can you verify that the "Page Attributes" meta box is enabled on the edit page screen, by clicking the "Screen Options" tab, and ensuring that the "Page Attributes" checkbox is checked?

  3. photoJoe
    Member
    Posted 1 year ago #

    yes I can see the "Page Attributes" box when i go to edit a page. I can enter a number and if i switch 'hierarchical' => true, I get a drop down box so I can put a page under a parent.

    But no template option.

  4. Chip Bennett
    Theme Review Admin
    Posted 1 year ago #

    Where do you switch "hierarichal => true"? That's not core functionality.

    Can you replicate the problem with:

    1. ALL Plugins disabled
    2. Twenty Eleven Theme active

  5. photoJoe
    Member
    Posted 1 year ago #

    "hierarichal => true" is in the functions.php file

    & if i switch over to Twenty Eleven Theme I do not see the new section with the pages in I wish to set templates for.

    i will try ALL Plugins disabled.

  6. Chip Bennett
    Theme Review Admin
    Posted 1 year ago #

    I'm sorry; I'm not following either of these:

    "hierarichal => true" is in the functions.php file

    As a part of what function? Without relevant context, it's impossible to know what's going on.

    & if i switch over to Twenty Eleven Theme I do not see the new section with the pages in I wish to set templates for.

    What new section? Are you not using Dashboard -> Pages to edit pages/page attributes?

  7. photoJoe
    Member
    Posted 1 year ago #

    the site does use Dashboard -> Pages but the theme has extra sections (under comments, 3 new sections i.e. Dashboard -> Our People). These new sections have been added in functions.php - which sits in top level of the theme folder.

    Our People did have the option to select a custom template 6wks ago, but just gone in to add a new page to this section and now this page attribute option has gone. & i can't see why.

    in trying to figure out what is wrong I did find a ref to "hierarichal => true" on this page; http://codex.wordpress.org/Function_Reference/register_post_type

  8. photoJoe
    Member
    Posted 1 year ago #

    i tried ALL Plugins disabled - but no luck here, still no sign of my templates ;(

    found ref to resetting the permalinks, but again this didn't work. Also found Ticket #12759 (closed defect (bug): fixed) which talks about page-attributes & custom templates being only available to

    Show page template dropdown only for pages

    my extra section is set as a page type.

  9. photoJoe
    Member
    Posted 1 year ago #

  10. photoJoe
    Member
    Posted 1 year ago #

    almost had it working! But no ;(

    I changed register_post_type( 'ompage',
    to register_post_type( 'page',
    and this had the template option appear, but it renamed Dashboard -> Pages to Dashboard -> Office Manual Pages & I did not get my new section. Just Pages in two places.

    I have 'capability_type' => 'page', - so it should work. Or can you ONLY have one set of pages in a theme?

    here is the whole part of the code;

    /* Office Manual Pages */
    function my_post_type_om() {
    	register_post_type( 'ompage',
                    array(
    				'label' => __('Office Manual Pages'),
    				'singular_label' => __('Page Item', 'theme1509'),
    				'_builtin' => false,
    				'public' => true,
    				'show_ui' => true,
    				'show_in_nav_menus' => true,
    				'hierarchical' => true,
    				'capability_type' => 'page',
    				'menu_icon' => get_template_directory_uri() . '/includes/images/icon_portfolio.png',
    				'rewrite' => array(
    					'slug' => 'page-view',
    					'with_front' => FALSE,
    				),
    				'supports' => array(
    						'title',
    						'editor',
    						'thumbnail',
    						'excerpt',
    						'page-attributes'
    						)
    					)
    				);
    	register_taxonomy('pagemanual_category', 'manual', array('hierarchical' => true, 'label' => 'Office Manual', 'singular_name' => 'Category', "rewrite" => true, "query_var" => true));
    }
  11. Chip Bennett
    Theme Review Admin
    Posted 1 year ago #

    Yeah, you're going to have problems/unintended consequences if you try to register_post_type( 'page' ), since that is already a core post type.

    Be sure to use your own, unique slug for your custom post type. I would stick with 'ompage'.

Topic Closed

This topic has been closed to new replies.

About this Topic