This should fairly closely mimic “Pages”.
function gallery_type_custom_init() {
$args = array(
'public' => true,
'label' => 'Gallery',
'capability_type' => 'page',
'hierarchical' => true,
'supports' => array(
'title',
'editor',
'thumbnail',
'excerpt',
'page-attributes',
'custom-fields'
)
);
register_post_type( 'Gallery', $args );
}
add_action( 'init', 'gallery_type_custom_init' );
If you need this to use your custom page templates, though, it won’t work. That part is hard-coded for page
post types only.
Related Posts:
- How to disable page delete
- get_pages() not ordering as it should
- Editing the Number at the end of Page URLs / Editing Page Slugs
- Pagination Help on Crazy Custom Authors Page
- Create subpage /user/ or /my-profile/ like /author/ with additional query like /user/user123
- Hide page title in WordPress 3.0
- Selecting An image from the Media LIbrary on the frontend
- Custom protected password page with ACF
- Page load requires a trailing “/” [closed]
- Virtual Pages plugins
- Programmatically add a custom page/path/url/route to WordPress
- What is the most idiomatic way to let clients edit phrases in HTML?
- How to merge all my pages into one, while keeping a menu bar?
- How to change URL Custom Page?
- redirect product-category to a custom page
- custom headers for static home page and posts page
- Show posts on a page based on a category and tag(s)
- Split Conference WordPress Page in different years
- Add google org chart to wordpress page
- How to get custom page template being edited in gutenberg editor
- Control Content On Non-Blog Pages
- custom meta box for page default template
- Best practice – pages – ACF or inline coding
- How to hook up search results page to a back-end page?
- How to structure model showcase
- How to customize
- Add a searchbox to the body of a page
- Create page as a file in my theme?
- Featured Image If Else Condition
- Insert menu with a custom walker into page / post body using shortcode?
- How to create “custom page types” with different custom fields in them?
- How to create custom search page
- Creating php pages in wordpress and assigning them to wordpress pages
- How to display page ids as page slug names?
- How to create custom layouts and static pages in themes for clients
- How to make the Pages in WordPress Customized?
- Creating custom page template
- Change Site Logo or Menu Logo Per Page
- change top banner content on specific page
- How to add page content into another page
- Display a specified content on a Page and all its child pages
- Use a custom page with dynamic content as a user profile page
- I want to embed mystream video in my wordpress site
- Swap home page based on user role, Elementor layout breaking
- Taxonomy template is not reading
- New Page/Post Screen Opens an Existing Post
- Static Page, need Last and Next links at the bottom
- How can I create a Custom Page? (not a page template!!)
- wordpress custom posts page not showing
- How to serve an already coded html page in a WP page, to assign a simpler url
- Admin menu disable new/delete page
- Show different pages on site depending on user choice
- WordPress post submit page
- Redirect Every Instance of The Author Template Pages to Custom Author Pages
- Allow arbitrary text after page URL
- Best way to create a page outside of the pages list
- Want home page to click through to two different page types
- Custom single page based on which custom page template is selected
- Page template with custom html fields inside a content
- Pass query param to custom page
- Is there a way to have information on one page automatically feed into another? [closed]
- how to add a page
- How to apply styles to the custom page template
- How can I make a search term redirect to a page
- Custom CSS working on home page but not on NEW created PAGE
- Create a page for each database table entries
- How to Add Customizer Setting in Child Theme
- Capability to edit own posts and not others
- Is there a way to create invisible pages?
- Which freelance sites are recommended to find WordPress developers/programmers, etc
- Syncing Avatars across multisite
- How to move the wordpress site from test url to main url? [duplicate]
- title, content, feature images
- How can I make site-wide content editable, for example footer content
- Custom Facebook share button with custom title,url,image in wordpress
- Sort posts by multiple meta key values
- Integrate wordpress into index page
- Add content in between of foreach
- Editing a post template
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- Let author add field to metabox by pressing a button
- Usage of custom post types in a custom admin menu
- How to set up conditionals in page templates?
- Select input in metabox not updated
- display text generated via custom get query string
- Bootstrap slider not working
- Custom post-type working except for Selecting page-parent
- How could I change contact details in the footer?
- Custom Route Returns 301/Passing Variable from Input
- Displaying posts inside table having issues
- Menu selection for header
- How to display custom admin pointers (tips/notifications) in Dashboard until dismissed?
- Custom password set/reset link in same URL format as default does’t work
- Two color in one Heading
- Creating custom setting in add media popup
- Still desperate about multiple TinyMCEs in widgets – is there any good solution to this yet?
- Expressions and str_replace
- How to create a new blog in wordpress?
- How to associate dynamic PHP page for chosen WordPress tag?
- Pass the post ID