Skip Navigation

[Resolved] $parent doesn't work when displaying brother pages

This support ticket is created 7 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)


This topic contains 6 replies, has 4 voices.

Last updated by kelvinL-2 7 years, 8 months ago.

Assigned support staff: Shane.



Followed your tutorial here:

However when I run it, it only displays children of the current post, not brothers. So the $parent tag is useless and is completely ignored.

How can this be fixed?




Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nathan,

The instructions that are in the url that you sent is intended to display the child posts of the Parent Post.

This implies that the pages that are displayed on the Parent page are brothers.

The id="$parent" tag is used when you want to display the contents of the Parent page in the Child page.

Let me know if this was clear.



Yep, really unclear. Tutorials could do with some more example.

I ended up making my own custom shortcode to get the current posts parent ID and return it to a view which get's the child posts of that ID. Props on the custom shortcode engine though works really well once you get the hang of it.



Tutorials on this site could use A LOT more work. They are written in a manner where everybody who reads them is left guessing and then being pushed from the free Types plugin to the purchasing the paid Views plugin.

Its a great plugin, very very powerful. If the tutorials were improved to back it all up, the support forums would have a lot less questions (at least from me! lol), and a lot more people would want to buy the plugin for sure.

Hopefully they're selling enough to make it worthwhile to improve them.


Dear nathanW-4,

Do you mind sharing your custom shortcode which I can get the current posts parent ID?



Hi Kelvin,

Sure, see below - add this to your functions.php, then add the available shortcode in views settings parentid

This website keeps ruining the code I paste, so I've placed it here for you:


Hi nathanW-4,

Many thanks for your code, it is nice.