Articles of page attributes

Created custom post type but selected template not staying selected

I have registered a new post type called Resources. I specify ‘page-attributes’ as a supported feature. When I go to create a new Resource post I see under Template that I can pick from a number of custom templates I have defined. But after I choose this and click update the setting isn’t saved and […]

How to disable Page Attributes dropdown in wp-admin

As discussed at WordPress admin screen very slow / timing out when editing or adding a new page/custom post I am having a similar issue on a WP site containing 7,784 pages. Edit screens are slow loading due to the rendering of all 7k pages in the source code for the Page Attributes dropdown menu. […]

Best way to arrange custom post types by Attributes -> Order metabox value?

I have my front page setup to display a custom post type via: add_filter( ‘pre_get_posts’, ‘my_get_posts’ ); function my_get_posts( $query ) { if ( is_home() && false == $query->query_vars[‘suppress_filters’] ) $query->set( ‘post_type’, array( ‘jwf_portfolio’, ‘attachment’ ) ); $query->set( ‘order’, ‘menu_order’ ); return $query; } What’s the most efficient way to have these ordered by the […]

Parent page using wp_dropdown_pages and multiple post types

Is there a way to get wp_dropdown_pages to return a list of multiple post types (including custom) as options for parent_id? I have tried supplying array for ‘post_type’ but beginning to think its either not possible? Or need to create a custom function to replace the meta box for page-attributes (parent_id) with a select which […]

How to get a list of post types that “support” various things such as page-attributes?

When you register a post type you can pass an array of arguments that it “supports.” (For example, “page-attributes,” “author,” “editor,” etc.) I see that get_post_types has some args you can filter by, but how can I filter those that “support” specific features such as “page-attributes” or “author”? I realize I could run a loop […]

WordPress admin screen very slow / timing out when editing or adding a new page/custom post

I’m new to the site but appreciate any help you can give. I have a WordPress set-up which (rightly or wrongly) has hundreds of pages and thousands of another custom post type which is also based on a page (ie hierarchical). When attempting to add a new page or custom post type (or edit an […]

Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?

(Moderators note: Title was originally “How can I add the “Page Attributes” and/or “Page Attributes > Template” selector to POSTS editor”) WP currently only allows the assignment of a “template” to Pages (i.e. post_type==’page’.) I’d like to extend this functionality to Posts as well (i.e. post_type==’post’.) How can I add the “Page Attributes” meta box […]