If you mean the 404 error:
function slt_childPageAction( $actions, $page ) {
$actions["create-child"] = '<a href="'.add_query_arg(array('post_type' => 'page', 'parent_id' => $page->ID), admin_url('post-new.php')).'" title="Create a new page with this page as its parent">Create child</a>';
return $actions;
}
add_filter( 'page_row_actions', 'slt_childPageAction', 10, 2 );
function slt_setChildPage() {
global $post;
if ( $post->post_type === 'page' && $post->post_parent === 0 && isset( $_GET["parent_id"] ) )
echo '<script type="text/javascript">jQuery( document ).ready( function($) { $("#parent_id").val("' . (int)$_GET["parent_id"] . '"); } );</script>';
}
add_action( 'edit_page_form', 'slt_setChildPage' );
(the url path to /wp-admin/ was hard-coded)
nice find btw 🙂
Related Posts:
- how to properly list child pages in sidebar?
- Get custom field value from Grandparent Page for Parent and Child Pages
- Given the page id, check if it has children
- How to get a list of all recently published child pages?
- WordPress get the child pages of current page
- Show siblings (if any) and parents
- List child pages of current page but limit to specific year
- Child page excerpt
- How to show child page without providing ID so it’s dynamic
- is_child() function
- Drop-Down Menu of Current Child Pages
- Get WordPress Child Page IDs
- Displaying the first child page of the parent page
- Adding title and description to subpage’s featured image
- Show list of Child Post in Parent Post
- List subpages in order
- parent page grabbing wrong url for child pages – get_page_uri($pageChild)
- i want to get the parent id, only on parent -> child -> child page
- Get first level children of a page ID
- Only one parent page showing
- Create a list of pages excluding children of selected page
- WordPress Betheme: Unkown subheader image of a child page
- How to disable alphabetical sorting page
- Structure for calling child pages
- Child pages and sub-pages do not appear. Why?
- Add link to parent page in list of child pages
- Display child pages full template including the content
- List child pages, exclude the current page
- Listing Child Pages in Random order
- How to display child pages with in a limited child content?
- Display Tags of Child Pages
- Get post_meta of children and compare to current page ID
- Display the latest content from subpages of another page
- Limit the number of child page displaying
- Show the grandmother/father of the childpage
- How to Hard Set the Parent Page in Template
- Display a list of child posts on parent posts of a custom post type
- 404 on child page when parent page slug is identical to custom post type
- Is there a default template file for child pages / subpages?
- Prev/Next child navigation for current page?
- How can I programmatically create “child” pages on theme activation?
- List child pages of a specific page
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- Breadcrumbs showing Parent and Child Pages
- Display subpages under parent page as a list within a loop
- Using pagination with get_posts on page type
- Add class to the items in wp_list_pages
- Allow users to publish child pages of the pages they have access to edit
- Displaying child page content of a certain parent
- Get only the grandchildren, not the direct children of page/current page?
- Query children and parent title
- Multiple Conditions for Child Page Title
- Paginate Child Pages Content on Parent Page
- Remove custom post type slug not working for child pages
- Page as a child of a Custom Post Type
- get_posts() excluding all children of a specific post/page
- List child pages of specific page using shortcode
- Set order of returned items in the WP_Query() class/function
- Pagination of a WP_Query Loop in a child-page page template
- load common thank you template with different content for different pages
- Schedule Page to Menu [duplicate]
- Display the contents of a custom field of a page on their child
- Linking to Child Theme PHP Files
- How to hide all child pages with post_query?
- How to display all subpages and short by year
- Display Child Pages of Custom Post Type Parent Page
- Trying to return list of child pages for a template
- Display child pages on parent page: 404 message overrules shortcode in page
- How to populate a parent page with its child subpages and associated templates
- query pages by a childs publish date
- Removing Parent Page URL While Keeping the Navigation Intact
- Organizing Your Pages
- get_the_title() gets printed out twice
- Display child pages in sidebar of parent page in wordpress
- Display child pages in a parent page? [closed]
- How to Create a Random List of Child Pages
- List all posts with the parent or grandparent of a page with a specified ID
- $pages = get_pages(‘child_of=’.$post->ID); Why arguments are concatenated?
- Do we need to change our child function.php to require/include child dir files when we add an over-riding file.php into the child theme
- How to hightlight all ancestor menu items of a child page NOT displayed in menu
- Sort and display pages with specific custom field (not tag)
- If/Else child list for Custom Post Type single template within loop?
- Check if parent page has child page of certain slug
- Child Theme not overwriting Parent theme php file
- How to get an array of pages ID by some page’s slug and all its children pages in get_posts() function?
- How to use POST method using custom wordpress button?
- Standard Page Child of CPT Not Found (404)
- Creating navigation out of specific IDs and their children?
- How to use wp_dropdown_pages or wp_list_pages to accomplish a menu like this?
- Displaying Child Page’s Information
- WP_Query doesn’t return some child pages even though the database shows them
- Load one page with parent and child pages
- List of child pages fetch next results at link click
- Pages redirecting to homepage
- Showing main menu and child menu in diffent places in a same page
- How to check if the current page’s parent is one of 2 different ID’s
- Detecting top parent category fails on home page
- How to make in post Parent page children page list nummbered
- List of pages – AJAX load more
- I have a website issue I am trying to resolve