Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter asterbird

    (@asterbird)

    nevermind, it’s in the widget!

    bindu sree

    (@bindu-sree)

    <?php
    $gen1 = $wpdb->get_col(“SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_parent = 0 AND $wpdb->posts.post_type = ‘page’ AND $wpdb->posts.post_status = ‘publish’ ORDER BY $wpdb->posts.ID ASC”);
    $gen1_ids = implode($gen1,’, ‘);
    $gen2 = $wpdb->get_col(“SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_parent IN ($gen1_ids) AND $wpdb->posts.post_type = ‘page’ AND $wpdb->posts.post_status = ‘publish’ ORDER BY $wpdb->posts.ID ASC”);
    $gen2_ids = implode($gen2,’, ‘);
    //don’t really need these next two lines but left there for example
    $gen3 = $wpdb->get_col(“SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_parent IN ($gen2_ids) AND $wpdb->posts.post_type = ‘page’ AND $wpdb->posts.post_status = ‘publish’ ORDER BY $wpdb->posts.ID ASC”);
    $gen3_ids = implode($gen3,’, ‘);
    wp_list_pages(‘include=’ . $gen2_ids . ‘&title_li=<h2>’ . __(‘Level 2 Pages’) . ‘</h2>’);
    ?>

    how can i display the author name for each title`

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to limit level depth’ is closed to new replies.