• Resolved timduncan

    (@timduncan)


    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)
  • Thread Starter timduncan

    (@timduncan)

    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 ‘child of post type (custom)’ is closed to new replies.