get_page for aunt/uncle

Probably a dumb question...

but, how do I use get_page for a page other then the one I am on?

i.e. if I am on page 2a how do I do a get_page for page 1?

1.
--a
--b
--c
2.
--a
--b
--c
jasotasticonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jayarjoCommented:
If you know ID of that page you can do just:

$page = get_post($post_id = ID); // replace ID with actual numerical ID of the page
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jasotasticonAuthor Commented:
jayarjo

I need this script to function dynamically, so I will not know the id or name of the page.

All the info I have will be that it is the previous aunt uncle.

J
0
jayarjoCommented:
Ok,

get_next_post() and get_previous_post() should give you next and previous pages to your current one. Then when you will have an IDs for these, you will be able to loop back or forward in time through pages, retrieve their children and do whatever you can imagine :)

Hope that helps.
0
jasotasticonAuthor Commented:
Thanks! Not exactly what I was looking for, but this led me to my answer.

I'm a newbie, and I really appreciate your help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.