WordPress.org

Forums

Post Tags and Categories for Pages
Query category on parent page (2 posts)

  1. chocula
    Member
    Posted 1 year ago #

    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/

  2. curtismchale
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Tags and Categories for Pages
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.