I want to use a pagination to custom post in a custom pages.I have custom-posts.php page where i write the code
<?php
function designs_theme_custom_post() {
register_post_type( 'logo-portflio',
array(
'description' => 'logo-portflio Post Type',
'show_ui' => true,
'menu_position' => 4,
'exclude_from_search' => true,
'labels' => array(
'name' => __( 'logo-portflio Items' ),
'singular_name' => __( 'portflio Item' ),
'add_new' => __( 'Add New logo portflio Item' )
),
'public' => true,
'supports' => array('title', 'editor', 'custom-fields', 'excerpt', 'thumbnail'),
'has_archive' => true,
'rewrite' => array('slug' => 'logo-portflio'),
));
}
add_action('init', 'designs_theme_custom_post');
?>
and call the post in logo-portfolio.php pages as
`<div class="portfolio">
<ul class="items col4 border">
<?php
global $post;
$args = array( 'posts_per_page' => 3, 'post_type'=> 'logo-portflio');
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post); ?>
<?php
$portfolio_large = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'portfolio-large' );
?>
<!-- /.filter -->
<li class="item thumb">
<figure class="icon-overlay icn-enlarge"><a href="<?php echo $portfolio_large[0]; ?>" class="fancybox-media" data-rel="portfolio"><?php the_post_thumbnail('portfolio-thumb'); ?> </a>
</figure>
<div class="bordered no-top-border">
<div class="info">
<h3 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php the_excerpt(); ?></p>
</div>
</div>
</li>
<!-- /.items -->
<?php endforeach; ?>
</ul>
</div>`
what i will do now to add add Pagination to custom post type in custom page.plase help me some one....