Help with displaying children pages [SOLVED]

Hi, I need some help here… I am relatively new to WP, so still orientating myself.

Anyway, I’m populating an Offcanvas menu with children pages.

I had this working earlier… the Offcanvas menu was showing all the children pages, with feature image, title and links etc.

I’m not sure what I changed but it stopped working suddenly. I’ve attempted to redo the WP actions, on the chance I was missing something simple. obviously I need to somehow define the parent page ID!

And I suspect it’s looking me straight in the face what I need to do here :joy: because what ever I did before worked :grin:

Ok, the obvious dawned on me, that this was only working when displaying the parent page. It populates all the sub-pages no problems (which is why I thought it was working, then suddenly stopped, because I was back on the home page.)

So any suggestions about how to make this ‘global’? eg. it will always show the child pages of page ID 14.

Do you have a suggestion here @adamslowe or some direction to achieving this.

You are so close! I think you just need to use the page_id parameter to force it always look at id=14. I’m not in front of a computer at the moment so I don’t remember where that is in them Pinegrow UI. Worst case scenario is that you might need to use a manually crafted loop query, but I don’t think it’ll come to that.

-Adam

1 Like

Unless I am not seeing it, there doesn’t appear to be an option to set the page_id. Only one to get the current ID.

You won’t see it in the Show Posts Smart action, you’ll need to convert it to a regular WP action (which as a lot more flexibility) to get the page_id parameter.

image

Then go down to the Post and Page Parameters

1 Like

Excellent.

I now see page 14 show in the offcanvas. So I need to somehow show just the children.

:thinking:

I tried everything but still facing same problem.

Came back to this today. And I have managed to solve it.

Following Adam’s advice here.

I have my options set like this, and it now lists all the child pages.

Thanks to @adamslowe for pointing me in the right direction here. We were so close as you say.

4 Likes

Awesome, I’m glad it helped you get to the finish line! And thanks for the follow-up.

2 Likes