Increase JetPacks Amount of Related Posts in WordPress

By default the related posts module from JetPack shows 3 related posts at the end of a regular single post in WordPress. You can use a JetPack filter to increase the amount of JetPack related posts with  – jetpack_relatedposts_filter_options.

You would use it like so…

Just change the number to how many related posts you want to appear.

There are a number of convenient JetPack filters available, another one is to change the related posts main headline from “Related” to someting else with jetpack_relatedposts_filter_headline

Both of these snippets are to be added to your themes functions.php file.

JetPacks CSS Layout

One of the issues you will run into when changing the amount of related posts is how JetPack controls the layout with CSS selector pseudo nth types – you will have to disable JetPacks CSS or write your own to override JetPacks – for instance to have a 6up layout that reduces without gaps when the viewport is smaller you will need to add in your CSS..

How your CSS files load will determine if you need to add the !important variable or not.