WordPress multi loop and pagination
-
Hi I’m currently working on this project
bsearch<?php $args = array( 'posts_per_page' => 2, 'category' => 5 ); $myposts = get_posts( $args ); foreach ( $myposts as $post ) : setup_postdata( $post ); ?> // content of the first 2 post here // <?php endforeach; wp_reset_postdata();?> <?php $args = array( 'posts_per_page' => 4, 'category' => 5,'offset' => 2 ); $myposts = get_posts( $args ); foreach ( $myposts as $post ) : setup_postdata( $post ); ?> // content of the last 4 post here // <?php endforeach; wp_reset_postdata();?>
I searched and I knew that by this way the page pagination will not work. But I only know a few basic in wordpress and php coding.
Can anyone help me solve this problem please?
Here is the design I made in PSD
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WordPress multi loop and pagination’ is closed to new replies.