WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] child of post type (custom)

[Resolved] child of post type (custom)

  • I registered a custom post type (foo) with

    register_post_type

    , setting

    ‘hierarchical’ => true

    ,so now when I want to use it I have

    post_type=foo

    How can I query child of foo? any ideas?

    thanks!

Viewing 1 replies (of 1 total)
  • solved:

    $the_query = new WP_Query( 'post_type=foo&post_parent=93' );
    
    // The Loop
    while ( $the_query->have_posts() ) :
    $the_query->the_post();
    echo '<li>' . get_the_title() . '</li>';
    endwhile;
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] child of post type (custom)’ is closed to new replies.