• 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:
    (thumbnail)
    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:

    <?php
    	$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>
    	<?php
    	}
    ?>

    http://wordpress.org/plugins/post-tags-and-categories-for-pages/

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

    (@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.