I found a solution! This is what I did:
<?php query_posts(array('orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => 1, 'post_parent' => $page_id, 'post_type' => 'page')); while (have_posts()) { the_post(); ?>
<a href="https://wordpress.stackexchange.com/questions/158490/<?php the_permalink(); ?>">Link</a>
<?php } ?>
<?php wp_reset_query() ?>
It makes a loop of sub-pages to a particular page and limits it to only 1 page. Nice and easy 🙂
Hope this can be of any help to someone else.
Related Posts:
- Remove parent slug for child pages
- Remove parent slug for child pages
- get permalink of page children in loop
- Return value of get_permalink(0) and get_the_title(0)
- Custom child page permalink
- Page permalink ending in “-2”
- 404 error on second page load for child-pages
- How does WordPress handle permalinks?
- Get page permalink without wpurl
- Can I use REST-API on plain permalink format?
- Creating custom permalink structure for languages
- How to change ‘with_front” key from an existing custom post type?
- Permalink not working for page without title
- Post titles not letting me use 2 consecutive dashes in permalink
- Using underscores instead of hyphens in the permalink
- Make post slug have priority over category slug
- Adding anchor to paginate_links + Safari anchor bug
- How to stop permalink redirects for a particular slug
- 404 on category.php pagination
- flexible rewrite ‘ramble’ URLs with WordPress
- Posts not working on windows after changing permalinks
- Custom permalink structure
- How to get rid of index.php?
- Relative or Absolute Paths for Flash Video Player Files
- Remove Custom Taxonomy Slug from Permalink
- WordPress Links Not Working After Migration
- Redirect old permalinks with Month and name to Post name on new site
- Migrating WordPress blog to New Webhosts, something is adding a # and gibberish
- .htaccess – Redirect duplicated post ended in ‘-number/’ to the same url without the -number/
- WordPress Permalinks on Mac OSX Server 5 (El Capitan)
- Adding File Extensions to Attachment Page Permalinks
- How to find out who handles a permalink?
- Permalink /%category%/%postname%/ returns 404 on OSX
- Page Attachment Permalink Structure based on Menu Order?
- Use Regular Expression to get tag from permalink url during wp_rewrite in generate_rewrite_rules
- Permalinks for pages
- Programatically changing post’s permalink when identical post type is published
- Remove parent category from permalink but keep breadcrumbs structure
- Is there a link parameter that will show me all my published pages?
- Add prefix to page URL based on the page template
- How to remove specific category from URL in WordPress
- How to set permalinks when posts and pages have different URL structures?
- Permalink /%postname%/ doesn’t work
- How to change hierarchical page permalinks to be flat
- Permalink structure with $_SESSION variables
- Relative v.s. absolute URLs: which ones should I use for cross-domain portability?
- WordPress 3.1 .htaccess contents keep dissappearing?
- Permalink in WordPress loop outputs for each new line
- Freeze child page URLs so parent permalink changes don’t give 404s?
- What causes /pages/ to appear in URI, and how to remove it?
- How Do I get the author’s page id?
- WordPress Installed But Not Showing Up! [closed]
- Echo title with permalink
- Importer failed to import posts as format “day and name”
- Old site posts broken after domain update
- Redirect From Url To Url
- help to remove last trailing slash using add_rewrite_rule
- change WordPress permalinks and redirect new urls 301
- Changing permalink structure and domain
- Permalinks not working in WordPress
- WordPress Permalink Redirect 301
- problem with pagination in custom permalinks
- Problem by $output and permalinks
- Pretty permalinks and Facebook comments
- WordPress upgrade from 2.7 to 3.3 Permalink problem
- /%post_name%/ or /%postname%/ in Permalinks?
- Remove international characters from slug – Almost done – Bit help
- flush_rewrite_rules on MultiSite
- A dash can replace a period in a link, how to fix it
- Remove character from permalink
- Post name permalinks File not found — Mac High Sierra
- WordPress image title attribute becomes permalink? [duplicate]
- Nested permalink without dummy parent page
- Website URL Permalinks
- Pages with parent pages giving 404 errors
- redirect any category in URL to the ID and post-name only – hundreds of pages affected
- permalink as content
- Permalinks Question: Adding a prefix ONLY in front of all posts with the ‘video’ post format
- How to get a clean pagination link without variable
- WordPress website redirecting to old domain if I not specificy / at the end
- Post permalinks go to the home page
- Add a product attribute to permalink in WooCommerce
- Remove index.php from url in permalinks over IIS server (web.config)
- add bar in paging in the URL
- LetsEncrypt WordPress on the Raspberry Pi – Nice url’s give 404 with https, http works
- On IIS, stop WordPress from resaving my web.config file when I enter the Permalinks config page
- Rewrite single template permalink?
- Can’t access WordPress site in subfolder possibly because of .htaccess redirect from root installation?
- Problem with multiple tags in URL
- Custom Permalinks and filters?
- Custom WP permalink structure
- ?posts_type=xxx not rewritten
- Permalink structure as code in back-end?
- Internal Server Error every time I push up my WordPress Project to Heroku
- WordPress custom permalinks, pages are now 404
- WordPress home page showing 404 error
- Is it posible to translate a url prefix?
- AllowOveride All causes assetts and Admin Urls to 404
- Page permalinks are http but show up as https?
- Settings > Permalinks – mod_rewrite ineffective if expression not preceded by /index.php/