Skip to content

Instantly share code, notes, and snippets.

@vishnusomanus
Last active September 28, 2017 08:49
Show Gist options
  • Save vishnusomanus/15ee7bd190a244f13badb96aacc08861 to your computer and use it in GitHub Desktop.
Save vishnusomanus/15ee7bd190a244f13badb96aacc08861 to your computer and use it in GitHub Desktop.
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
query_posts( array(
'post_type' => 'team',
'posts_per_page' => -1,
'paged' => $paged
) ); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
$image = wp_get_attachment_url( get_post_thumbnail_id($post->ID));//thumb
//$time = get_post_meta( get_the_ID(), 'wpcf-time', true );//custom field
the_title(); //title
the_content();//content
echo $image
?>
<?php
endwhile;
endif;
?>
<ul class="pagination pull-right">
<li><?php echo get_previous_posts_link( 'Previous Page' ); ?></li>
<li><?php echo get_next_posts_link( 'Next Page', $the_query->max_num_pages ); ?></li>
</ul>
<?php wp_reset_query();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment