Articles

[insert_php]
$post_type = “article”;
$posts_per_page = 10;
$paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1;
$offset = ($paged -1) * $posts_per_page;
[/insert_php]

echo $post_type; [/insert_php]” image_size=”medium_large” wrapper=”div” include_excerpt=”true” excerpt_more=’Continue Reading…’ excerpt_more_link=”true” excerpt_length=”30″ wrapper_class=”custom-grid” orderby=”post_modified_date” order=”DESC” posts_per_page=”[insert_php] echo $posts_per_page; [/insert_php]” offset=”[insert_php] echo $offset; [/insert_php]”]

[insert_php]
$the_query = new WP_Query(array(‘posts_per_page’=>$posts_per_page,
‘category_name’=>$post_type,
‘paged’ => $paged));

$big = 999999999; // need an unlikely integer
echo paginate_links( array(
‘base’ => str_replace( $big, ‘%#%’, get_pagenum_link( $big ) ),
‘format’ => ‘?paged=%#%’,
‘current’ => $paged,
‘total’ => $the_query->max_num_pages));

wp_reset_postdata();
[/insert_php]