Back to Browse

Change Posts Per Page for Custom Post Types in WordPress

807 views
May 22, 2021
12:07

WordPress has an option to change the number of posts per page for your blog archive. However, if you happen to have a custom post type and want to change the posts per page for that CPT, you will notice that there is no such option natively in WordPress settings and chances are your theme does not have it either. But do not worry, Geko has got you covered! With a simple code which you put to your functions.php file (Child theme), you can easily control that. Moreover, you can set a different posts per page number for multiple custom post types that you might have. Watch the video for the full instructions. Web Design Case Study (the website I featured in this video) https://youtu.be/jY8BENgRCV4 (front-end design process) https://youtu.be/j7Zzr1JtuHg (back-end showcase) Do You Need a Child Theme in WordPress? https://youtu.be/jk1zu6s4HEQ CODE: https://bit.ly/344LkXS TABLE OF CONTENTS 00:00 Intro 01:06 Posts per page for default post type 02:00 Why would you want it different for CPT 04:25 How to change posts per page for CPT 05:46 Code explanation for functions.php file MUSIC Danger Storm by Kevin MacLeod Link: https://incompetech.filmmusic.io/song/4985-danger-storm License: https://filmmusic.io/standard-license

Download

0 formats

No download links available.

Change Posts Per Page for Custom Post Types in WordPress | NatokHD