I am using the following code, To display all post for a particular category

   $random_post = new WP_query(); 
  while ($random_post->have_posts()) : $random_post->the_post(); 

And it is working fine but i need a custom pagination , i just want to display only 5 post in a page.if you have any idea please let me know asap.

Read more here: Need custom pagination for wordpress loop


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: