WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to get IDs of child pages in 2.0.10? (2 posts)

  1. triffid
    Member
    Posted 6 years ago #

    Hi,

    I'm trying to get the IDs of the children of the current page in WP 2.0.10. I've done this with 2.3 previously using something like the following database query - but I can't seems to get it to work in 2.0.10.
    Can anyone offer me some pointers on what I need to change to get it working?

    $childpages = $wpdb->get_results("SELECT $wpdb->posts.* FROM $wpdb->posts WHERE post_type = 'page' AND post_parent = " . $post->ID . " ORDER BY post_title ASC");

    Thanks

  2. triffid
    Member
    Posted 6 years ago #

    So, 'post-type' isn't used in 2.0.10, I should have used 'post-status=static'.

Topic Closed

This topic has been closed to new replies.

About this Topic