Yes, this can be done. Here’s how:
get_post_types( array('supports' => array('page-attributes')), 'names', 'OR');
This Trac ticket provides some explanation as to why that last parameter—the ‘OR’—is necessary: http://core.trac.wordpress.org/ticket/17620
Related Posts:
- Best way to arrange custom post types by Attributes -> Order metabox value?
- Custom page type – template under page attributes?
- Parent page using wp_dropdown_pages and multiple post types
- Custom Post Types for Support Ticket plugin?
- Add Standard Page Attributes Metabox for Page Parent
- Sort CPT archive by order prevents sorting in admin
- How to use Custom Page Templates for hierarchical Custom Post Type
- Set template for custom post type?
- Add a custom meta box for client to order CPT posts how they want
- How to enable parent-child relationships and post attribute admin widget for posts
- Remove Header and style.css from Specific Post template
- How to enable post types on Page Attributes?
- WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
- Templates list in “Page Attributes” metabox is inaccurate
- Noob Loop Question
- Advanced search form with filters for custom taxonomies and custom fields
- WordPress 3.3 custom post type with /%postname%/ permastruct?
- Show Custom Taxonomy Inside Custom Menu
- Have different search results template depending of custom post type searched
- Why does a custom post type need the ”hierarchical’ args setting?
- WordPress REST Create Post of Custom Type
- How do I programmatically add items of content to a custom post type?
- Created a custom post type- can’t view it
- Merging two Custom Post Types into one
- Permalink rewrite with custom post type and custom taxonomy
- Use standard WordPress categories with a CPT
- remove_action conditionally for Custom Post Type
- WP_Query pagination using only numbers instead of /page/1 on URL
- How do I set the content for a post of a particular CPT?
- Uploaded image not appearing in custom post type
- Custom Post Types – Titles as Taxonomies
- Custom post metadata not appearing in public API
- Using pre_get_posts to Filter Posts
- Impossible to get Attachments Outside WordPress?
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- Taxonomy Templates
- Pagination on Custom Post Type: 404 Error
- Is it possible to create a shortcode that will query a post based on taxonomies?
- Redirecting when changing custom post type slugs?
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- How can I show/add/save custom metaboxes as an Array of values?
- Query Multiple Meta Values and display only when it has both meta values
- Query custom post type in the loop
- Custom Post Types – Change order of menu items
- What template files do I need to customise custom-category-term-links rather than fall back on archive.php?
- get the custom post type title/name
- Custom post types as sub menu pages and role capabilities issue
- Troubles with acf/save_post and WP_Query
- Query custom post type with ACF Date
- Add custom field in comments form
- WordPress request fiter order by related post’s post_title
- Need help with permalink rewrites for Custom Post Types with hierarchical relationships
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- Custom post with more than one custom taxonomy
- Shortcode for CPT post content in a page
- How to use manage_$post_type_posts_columns with underscore in post type?
- Categories and tags for custom post types
- WordPress 3.9 not using custom template
- Custom post type capability type ‘page’ not working
- How to include custom post type posts on a page?
- uploading problem of wordpress theme
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- How do you make a list and list item relation if custom post types?
- How to properly rewrite pagination rules for a CPT to avoid 404 error on /page/2
- display posts of custom post type with custom taxonomy
- Getting array_merge(): Argument #2 is not an array on register_post_type
- How can I relate custom post types?
- creating files for displaying different custom post type posts with paging
- Sorting by meta_key different to search criteria?
- How to fetch posts that are stored in the different table than (default) wp_posts?
- Save Custom Fields
- Custom post type posts wont show in wp_nav_menu()
- “Order” doesn’t work in custom loop?
- how can i add an array of post types to this query?
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- WP Query: If field X is empty, show posts based on field Y
- Display Posts that fit a certain criteria on Category pages
- Shortcode with loop stacks output
- How do I find out which (page) template file my custom child post is looking for?
- Custom post type order by post_title
- Modify Url for Edit Post Screen in Custom Post Type
- How to get post by meta value
- Create dynamic logo carousel without using any plugin
- Use Category for Custom Post Type – But Need Another Separate Archive Page too
- Exclude Posts in a Given Category
- Custom post type translation
- Front page url permalink
- How to retrieve json data from custom json enpoint created from a custom post type
- Test for post type in request filter?
- What kind of post type structure do I need to manage a list of ranked skills?
- How to make post page unique and show it on home page?
- Custom Post Type Permalinks Problem
- How to loop through custom posts in admin edit screen
- Custom Post Meta on a Different Page?
- wp_redirect to file:// location results in blank page/cannot be displayed page
- Posts 2 Posts: query connected — orderby problem
- YARRP related posts with custom post type and wp-graphql
- Menu Structure and URL structure, with Pages and Post-Type-Posts
- WordPress does not show the custom fields box
- Create a hierarchical list of posts that’s grouped and nested by category