Wordpress Custom Fields

Out of context: Reply #7

  • Started
  • Last post
  • 8 Responses
  • mg330

    Centigrade,

    Thanks again for posting that. Helped me look around existing pages and I lucked upon realizing that I can grab existing code used on the homepage template and repurpose it:

    <?php
    $args = array(
    'post_type'=>'portfolio',
    'showposts'=> 6
    );

    $temp = $wp_query;
    $wp_query = null;

    $wp_query = new WP_Query();
    $wp_query->query( $args );

    ?>

    <?php if ( $wp_query->have_posts() ) : ?>

    -------------USE EXISTING CODE FOR THUMBNAIL DISPLAY----------

    <?php endwhile; ?>
    </ul><!-- .fromportfolio-items -->
    </div> <!-- .portfolio-items-wrap -->
    </section><!-- #fromportfolio -->
    <?php endif; wp_reset_query(); $args = null; ?>

View thread