Site icon Cody Paste

Number Pagination for WordPress Posts

If you want number pagination for the WP post loop you have to write the given code in the function.php file and use ‘<?php numeric_pagination(); ?>‘ in the template where you want to use pagination.

Find the complete code below:

 

STEP 1:

Write in function.php or the ‘Code Snippets’ plugin (if you are using it).

 

STEP 2:

use ‘<?php numeric_pagination(); ?>‘ in the template where you want to use pagination.

 

 

In Some case, Pagination in category link gives 404 error, to resolve this error you can add given code below in function.php file.

 

If you are using post loop on ‘Home Page’ there might be some issue with your loop or pagination.

Solution:

Use ‘page’ instead of ‘paged’ in loop. Please find complete code below.

 

 

Exit mobile version