Show postd from multable post types (1 post)

  1. sdesigns
    Posted 2 years ago #

    I am trying to have a page with multable custom post types showing on it I have gotten the below code to work after tying many options but I need it to show just one catigory within each of the post types outdoor-recreation.

    // set the $paged variable
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    // query the posts of your custom post types
    query_posts( array(
    		'post_type' => array(
    				'paged' => $paged ) // for paging links to work
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
            							<div class="metadate"><?php the_time('l, F j, Y') ?></div>
    <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    <div id="featuredimage">
    if ( has_post_thumbnail()) {
      echo '<a href="' . get_permalink($post->ID) . '" >';
      echo '</a>';
    ?><!-- end featured image --></div>
    					<div class="entry">
                        <?php the_excerpt(); ?>
                                     <br class="clearfloat" />
    	<?php endwhile; ?>
    <?php wp_pagenavi(); ?>
    	<?php else : ?>
    		<h2>Not Found</h2>
    	<?php endif; ?>

    I have tried to change out the array to

    'post_type' => array(
    				'paged' => $paged ) // for paging links to work

    But that gives me a not found.

    Any help with this would be appreseated as I am stumped on this one

Topic Closed

This topic has been closed to new replies.

About this Topic