Support » Plugin: Post Tags and Categories for Pages » Query category on parent page

  • I am trying to do something which i thought would be simple but isn’t turning out so.

    On a parent page i want to show the thumbnail and title of a child page (which i have been able to do). The problem is that there are two types of child page and i want to show them separated on the page e.g.

    Current exhibitions:
    page 1

    Previous exhibitions:
    (thumbnail) (thumbnail)
    page 1 page 2

    I thought if i added a category then i could just if category = show these pages if not etc but i can’t get it to work. Is this something that your plugin can do or am i going about it the wrong way. Wanted to post here before i throw it out to general wordpress forums. This is the code i am using:

    	$mypages = get_pages( array( 'cat'=> '3', 'child_of' => $post->ID, 'sort_column' => 'post_date', 'sort_order' => 'desc' ) );
    	foreach( $mypages as $page ) {		?>
                    <?php echo get_the_post_thumbnail( $page->ID ); ?>
    		<h2><a href="/<?php echo get_page_link( $page->ID ); ?>"><?php echo $page->post_title; ?></a></h2>

Viewing 1 replies (of 1 total)
  • Plugin Author curtismchale


    All my plugin does is add the stock WordPress tags/categories to your pages. It changes nothing about your theme at all.

    I don’t think it will do what you want as described here.

Viewing 1 replies (of 1 total)
  • The topic ‘Query category on parent page’ is closed to new replies.