NEWS

$paged1, 'category_name' => 'news', 'posts_per_page' => 100, ); $query1 = new WP_Query( $args1 ); while ( $query1->have_posts() ) : $query1->the_post(); echo '

'; the_title(); echo '

'; echo '
'; // wp_trim_words( the_content(), $num_words = 100, $more = '… ' ); // the_content(); $my_postid = get_the_ID();//This is page id or post id $date = get_post_meta( $my_postid, 'date',true); $date = apply_filters('the_content', $date); echo $date; $content_post = get_post($my_postid); $content = $content_post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); $content = wp_trim_words( $content, $num_words = 20, $more = '… ' ); echo $content; echo ''.__('Read more ›','').''; echo '
'; endwhile; // http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters $pag_args1 = array( 'format' => '?paged1=%#%', 'current' => $paged1, 'total' => $query1->max_num_pages, 'add_args' => array( 'paged2' => $paged2 ) ); echo paginate_links( $pag_args1 ); ?>

USEFUL INFORMATION

$paged2, 'category_name' => 'past-events', 'posts_per_page' => 3, ); $query2 = new WP_Query( $args2 ); while ( $query2->have_posts() ) : $query2->the_post(); echo '

'; the_title(); echo '

'; echo '
'; $my_postid = get_the_ID();//This is page id or post id $date = get_post_meta( $my_postid, 'date',true); $date = apply_filters('the_content', $date); echo $date; the_content(); echo '
'; endwhile; $pag_args2 = array( 'format' => '?paged2=%#%', 'current' => $paged2, 'total' => $query2->max_num_pages, 'add_args' => array( 'paged1' => $paged1 ) ); echo paginate_links( $pag_args2 ); ?>

Subscribe to our newsletter to always get the latest news