Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6186629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:55:18+00:00 2026-05-24T01:55:18+00:00

I try to achieve the following layout with WordPress 3.2.1: —> ID 4 (Record

  • 0

I try to achieve the following layout with WordPress 3.2.1:

---> ID 4 (Record 2, 3rd Attempt)
 --> ID 3 (Record 2, 2nd Attempt)
  -> ID 2 (Record 2, 1st Attempt)
 --> ID 5 (Record 1, 2nd Attempt)
  -> ID 1 (Record 1, 1st Attempt)

Every line represents a page and on the Backend the page hierarchy looks like that:

-> ID 1
--> ID 5
-> ID 2
--> ID 3
---> ID 4

I’m sorry I prepared a nice illustration but I’m not yet allowed to post images. So, to explain it a bit further: I try to build a list of records and as soon as one of the records gets broken, it will shift to the right and on top of it the newest record attempt appears.

Ok, so first question: How do I have to set up query_posts to recursively get all children? The following code only returns page 3 but not 4:

<?php query_posts(array('post_parent' => 2, 'post_type' => 'page')); ?>

And second question: Does anyone know a better/simpler/sexier (WordPress) solution for what I try to achieve?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:55:19+00:00Added an answer on May 24, 2026 at 1:55 am

    try

    $child_pages = get_pages('child_of=2');
    

    you can look it up in the WP Codex here: http://codex.wordpress.org/Function_Reference/get_pages

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try the following code public enum Color { Blue=1, Red=2, Green=3 } public List<Color>
Try executing the following in JavaScript: parseInt('01'); //equals 1 parseInt('02'); //equals 2 parseInt('03'); //equals
I'm using the following code to fadeOut and fadeIn content divs on a page
I am programming in C++ and I'm not sure how to achieve the following:
In C++, how can I achieve the following: // player.h #ifndef PLAYER_H #define PLAYER_H
I am try to convert the following NHibernate query using dyanmic instantiation into an
I'm try to figure out how to handle the following scenario. In general, i
We did following ugly thing: So, how can we achieve another reintegrate ? What
I need to achieve something like the following: def some_function redirect_to :action=> show ,:id=>current_user.id
i actually try to do the following: I have loaded an external image in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.