I am using two strategies here…
1) is simple redirection to first child (using menu order)
page-redirect.php
<?php
/*
* Template Name: Redirector
* Description: Empty Holder (redirect page)
*/
$rp = new WP_Query(array(
'post_parent' => get_the_id(),
'post_type' => 'page',
'order' => 'asc',
'orderby' => 'menu_order'
));
if ($rp->have_posts())
while ( $rp->have_posts() ) {
$rp->the_post();
wp_redirect(get_permalink(get_the_id()));
exit;
}
wp_redirect(dirname(home_url($wp->request)));
exit;
2) generating a menu on a parent with a links to children (as example of it – http://unu.edu/about)
Related Posts:
- Get content from one page and show it on another page
- How to Check if a Page Exists by URL?
- Why content_arr[‘extended’] removes paragraph tags?
- How do I get blog posts to appear within CMS?
- Add Word Limit to Posts
- Start post pagination at 0 instead of 1
- How do I do a page break?
- the_content() Not Grabbing All Content
- Preview page/post revisions without overwriting current content
- Category URL to use same string as Post URL Permalink
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- WordPress URL question
- structure of posts and pages
- Make Show Notes for Individual Podcast Episodes Easy to Find (multiple URL’s?)
- Get part of a page url
- Blog posts are not appearing as subs of Blog Page
- Automatically search and replace link in content (pages/posts)?
- How to display breadcrumb on category?
- Stop WordPress Wrapping Images In A “P” Tag
- Stop WordPress automatically adding tags to post content
- Determine if page is the Posts Page
- Get the Current Page Number
- Stop WP from creating “Sample Page” and “Hello World!” post
- Keyboard shortcut for updating a page or post?
- Apply the_title() filter in post & page title, but not in menu title
- How to display by default only published posts/pages in the admin area?
- Get current menu_order
- Difference between an archive and a page listing posts
- Delete Associated Media Upon Page Deletion
- Access post from post id in URL
- How to add category to: ‘wp-admin/post-new.php’?
- The next_posts_link() works only with original $wp_query
- Is there a way I can write a series in WordPress?
- Connection lost. Saving has been disabled… (Updating Posts/Pages)
- get_children() Not Working with orderby Parameter
- Different number of posts in each category
- how to limit edit_form_after_title hook to page and post edit only?
- Using single.php from plugin folder instead of default template folder
- Post/Page Publish/Update button not clickable once I make an edit
- Skipping first 3 posts in wp query
- Custom Field in Featured image for A particular post
- How to add a new tab to page editor
- How to display the page title/content in the Posts page?
- How to remove Nextpage tag inside posts text depending of utm_campaign
- Callback for wp.autosave.server.triggerSave();
- How can I see a list of pages and post where my custom Gutenberg block is used?
- Restore contents of deleted user
- disable password protected page for logged users
- How to change post to page
- Open WordPress ‘Add New Post’ admin page with parameters set via $_GET
- RSS for Pages Instead of Posts?
- How do you get all the urls of images attached to a post?
- How can you make sure authors’ posts are longer than 250 words?
- Display posts by tag on page
- Why do I need to use The Loop on pages (inside page.php etc)?
- What is the difference between “post” and “page” in WordPress?
- What is the best / efficient way to get WordPress content by post id and why?
- Create custom page in WooCommerce
- posts page – different lengths of excerpt
- WordPress automatic and permanent page
- JSON not valid after json_encode posts
- Is there a WordPress equivalent to MediaWiki templates
- Determining Slug Before and After Edit
- Getting an alphabetic post list with two letters onclick on letter
- Automatically create pages in a post based on number of words
- Static posts page with home.php
- Add default content to post (for specific category)
- Change WordPress post-state in Admin Area
- Pagination not working on Custom Page Template
- Set number of article per number of page
- Pagination for Pages and Posts
- Programmatically inserting page breaks
- How to allow slashes in single posts when i click in the edit permalink button
- Is it possible to show a different WP menu when using password protected pages?
- Can I change a post to a page by changing it’s type?
- Overview with latest edited posts and pages
- Hide parts of the post content on the home page
- how to show all post in my page-grid.php template page
- Filter/Remove HTML Elements on all posts and pages
- eBooks download website, page or post?
- Possible to create a permalink to sort with meta_key?
- Multiple loops in same page, without duplicate content
- how to grab first link in post… and of course call it
- Paragraphs removed when using get_post_custom()?
- Add a custom option to a page in backend
- Include related posts on a page
- Load post content into div with ajax
- why does HTML Tag not working in Post and Page
- Creating new page with pre-defined parent page
- problem to delete page
- How can I extract the URL of a link from a post?
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- Populating a page with content from post custom fields
- Can I hide a specific post from latest posts page?
- Hide add new page button
- Edit menu item title from edit page/post
- Redirect before post page
- Testing for post title in ‘if/else’ statement returns no content
- $post object is null
- How to show post(excerpt) from specific category on wp page?