Display subpages and sibling links on pages
-
Hi,
I want to (a) return the child links of a parent in my WP page and (b) I want to be able to return siblings links.
I want to emulate the subpages and sibling link functionality of this plugin https://wordpress.org/plugins/page-list/ but want to use an IF conditional which the plugin doesn’t allow. I can’t do ‘IF shortcode is empty do X ELSE do Y’ so I need PHP code I can place in the page template whereby:IF subpages returns links output a div with content ELSE output nothing
IF siblings returns links output a div with content ELSE output nothing
I tried Google WP PHP code to return subpages and/or siblings but what I found didn’t work or threw errors.
Any help appreciated.The blog I need help with is: (visible only to logged in users)
-
Who knows where “The blog I need help with is: dev.its-devops.com” came from. Sucks u can’t delete OR edit these posts!
-
Hi there, could you let us know the URL of the site you’re asking about? Please bear in mind that we are able to help with sites that are hosted here with us on WordPress.com, but for sites using the WordPress software from WordPress.org, there is a community forum at this address:
https://wordpress.org/support/forums/Here on WordPress.com we do have a page list shortcode instead though it may not do exactly what you need:
https://wordpress.com/support/list-pages-shortcode/
- The topic ‘Display subpages and sibling links on pages’ is closed to new replies.