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)?
- Stop WordPress automatically adding tags to post content
- Get current menu_order
- How to add category to: ‘wp-admin/post-new.php’?
- Is there a way I can write a series in WordPress?
- Different number of posts in each category
- Post/Page Publish/Update button not clickable once I make an edit
- Open WordPress ‘Add New Post’ admin page with parameters set via $_GET
- Is there a WordPress equivalent to MediaWiki templates
- Getting an alphabetic post list with two letters onclick on letter
- Change WordPress post-state in Admin Area
- Pagination not working on Custom Page Template
- Programmatically inserting page breaks
- Multiple loops in same page, without duplicate content
- Include related posts on a page
- How can I extract the URL of a link from a post?
- $post object is null
- Same content shared between multiple posts?
- Is there any WordPress alternative to Book module of Drupal?
- Convert a complex webpage into WP theme
- How to get only text from wordpress post content?
- Random post category URL
- Should a photo gallery be in a post or on a page?
- Multiple loops are not reset
- Drag posts and pages so you can sort them in order
- 301 (static page instead latest posts)
- Show only posts with images and a fixed amount of posts
- Permalink doesn’t get displayed in Twitter button (Local WordPress problem?)
- Multiple Loops Breaking Pages
- How do I Redirect a WordPress Page?
- is_page Funtion for Posts ?
- Admin – no Featured image choice in create new/page|post
- WordPress Query Posts From Category Post on Static Page
- Intercept page request and add value to it
- Output Post with ACF Fields into other Post
- get_children returns older images
- Detecting current page from class method
- List all posts, pages and custom post types in admin
- Change Author Name to Sitename on Frontend
- Are post, page and category IDs unique to each other?
- Showing recent post of category in page
- content summary of a post disappears If an images added at the beginning of the post. how to solve it?
- Inserting Media to WordPress Posts
- Custom Post Type, post-formats associated to custom post type > 404 archives
- How to exclude the word “class” from being matched in search?
- Problem with articles feed: XML Parsing Error: XML or text declaration not at start of entity
- Have posts included on a page that share same category
- Link from Post to Another Post Via Clicking on Words within Original Post
- Link to older links
- How to show next/prev link, when it’s not active?
- What would causes search to return incorrect results?
- Cannot publish posts, but can create new pages
- Making a new post visible on a specific page
- Can I restore restore content from old Worpress site to a new Worpress site from an archive
- why my urdu text is not aligned properly when written in wordpress blog post?
- Edit post & page option does not display on latest wordpress
- Custom Fields – How to get the list of a specific active widget each time it rendered
- Permalink Short code showing unnecessary link text inside the loop
- Add CSS and JS files of the template post on a WordPress page
- Can’t find webpage on All Pages or All Post menus
- how to put post customized in page
- How to generate an HTML link automatically from URL in a users’ post
- Show code only on WooCommerce Pages
- Prevent Archive URLs
- Very weird behaviour after removing WP pages
- Multiple Pages – Seperate blogs
- Posts are not showing up on next page.
- How to give priority to page than to posts permalink structure?
- Post as frontpage – avoid duplicate content
- How can I display a specific number of post in a category via a url
- Display only current page -> posts tags in page
- How to get post_content while the post is being edited
- Call posts of particular category in a page
- Add wp-link-pages to post
- How to arrange different post categories in template
- How to mix pages and sub-categories in a url
- Make a custom URL and link to custom Template
- Posts and pages not getting published
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- After the local installation of an old WP website I can see the homepage but I can’t access to the articles, why?
- Cannot Create a new Post [closed]
- wordpress category Description not allowed tag
- Post page still linked to old site
- How to add paraent in Blog post URL in wordpress