is_page() is not working on the admin area so I needed to use the following code
function this_screen() {
$current_screen = get_current_screen();
if( $current_screen ->id === "page" ) {
include_once 'page_admin.php';
}
}
add_action( 'current_screen', 'this_screen' );
You can replace “page” to any custom post type name
Related Posts:
- Integrating a custom post type into a page hierarchy
- Custom Post Type Slug / Page Slug Conflict – Prevent use of reserved slug on page save?
- Searching multiple custom post types and pages
- Return current page type
- Custom Post Type as Page parent
- How to add a post from a custom post type as the static page?
- Get page by template?
- Page as child in custom post type slug?
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- TV Show database – Best way for structuring it?
- Is there a way to make a custom Page type?
- Menu position (admin menu) of pages
- How to Add Pages Under Custom Post Type URL Structure?
- Custom Posts on Different Pages
- Pagination with custom loop
- Include images from pages in wp search.php results in default wp search
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- How to create user personal pages with information from their meta profile fields?
- Display “Post 2 of 4” on single post page?
- Custom Post Type Name Causing Problem
- Make custom post type display as a page
- Multiple portfolios with one custom post type?
- Is it possible to use pages to apply static content to each taxonomy level?
- Making pages also serve as taxonomies? Or give full pages to taxonomies?
- ‘Pages’ widget alternative for custom post types?
- Custom Blog Post Listing in Genesis Sample Child Theme
- remove child post from custom post type archive
- Pull in custom content types into page template
- custom posts on different page
- Trying to edit the single page from a Custom Post
- How do I fix permalinks for custom post types that has the same slug as a page?
- Should I use custom taxonomy or custom post type
- Disable featured image
- Making a custom help center page
- create a template page for a post
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Trouble with CPT Child 404
- Database to page routing API?
- Allow Static Page Load Dynamic Child Pages
- No Permission to add new Page, Post or CPT with Admin role
- Static page determines as home, but it is not
- Show Custom Post Type meta boxes only on Page Edit
- Why does my content disapear when I make a page to match an archive name?
- How to use Custom Page Templates for hierarchical Custom Post Type
- Page for custom post type
- Why does not this wp_redirect work in is_single()?
- Pros and cons of a custom page vs custom post type template file
- How to include custom post type posts on a page?
- Multiple pages per post (not pagination)
- Can I change my post type to anything and my site still work?
- Page listing Custom Posts
- Display an authors post on a single page only when they are logged in
- Why are some of my custom posts not showing up on my page?
- Merge page with custom post type
- Hide Status Option From WordPress Publish Metabox and Rename Published on:
- URL Rewrite – Page Archive
- How to set the mainpage of a custom post type?
- Render a Post or Page using the correct file
- Setting a homepage – doesn’t seem to work
- Under What Conditions Can I name my CPT the same as my CPT Page?
- custom post creation on front page – on submit a search is done
- wp_dropdown_pages with tax_query clause
- Am I mixing up the concept of posts pages and categories?
- How to setup different permlalinks for posts and pages?
- Sets post_parent in custom post type posts automatically based on cpt->page name
- Tag template not returning posts [closed]
- Does “Custom Post Type” can have page hierarhy option?
- How do I disable the built-in editor and automatically configure the properties of new pages?
- How to set a ‘page’ as parent of a custom post type?
- Add custom template ‘sub-page’ to Custom Post type?
- Metabox collapsed by default
- How to use posts as tabs in a custom page?
- Custom Post Type Single Page and Archive Page redirects to Home Page
- Create Custom page with custom domain
- How to stop a permalink redirecting to a page whit same slug but different permalink
- Do not show child pages within a file page
- Disable Sidebar on certain pages
- Cannot save pages after migration
- Displaying posts inside table having issues
- Custom post types & Pages hierarchy – Error 404
- How to make “single post” permalink maintain it’s sub-page structure
- How to manage a custom post type archive as a page?
- How to manage a custom post type archive as a page?
- Include images from pages in wp search.php results in default wp search
- WordPress Contents Migration
- How can I make my CPT read from page-*post-type*.php?
- One Post with different content, depending on a Page
- Use the page picker from wordpress menu creation page
- Different post types arranged on one page
- How to display data with pagaination on backend?
- archive.php can’t find categorized posts
- Is it possible to make one of two custom fields in Custom Post Type UI Required but not the other?
- Excerpt for each post type and for is_front_page
- Programmatically Split A Post Into Multiple Pages
- query_post while (have post) get_template_part()?
- “regular” pages not found after changing permalink
- Custom Post Type Slug / Page Slug Conflict – Prevent use of reserved slug on page save?
- Using custom post types within a section of a template
- Page that ‘subscribes’ to multiple categories
- How do I hide single category post on my post page