Services - - the page shows 10 and I need more

Thanks for a great template.

This page only shows 10 service ICONS. I would like to add more.

How do I do this, please?

Hello there,

By default number of entries limit follow the number has been set in the Settings > Reading > Blog pages show at most. To modify it on a specific post type like Services, you’ll need to add the below additional function:

add_action( 'pre_get_posts', 'prefix_change_services_limit' );
function prefix_change_services_limit( $query ) {

	$q_vars = $query->query_vars;

	if( ! is_admin() && isset($q_vars['post_type']) && $q_vars['post_type'] == 'services' ){
		$query->set('posts_per_page', -1);


-1 will display unlimited items.

Add it to your child theme’s functions.php file. Or you can use a functionality plugin such as Code Snippets.


Thanks - I added the code and the site now no longer loads. I just get a white page.

I thought I had removed the code - same.

Bit of a disaster really.

Hello there,

Try to force deactivating the Code Snippets plugin by doing these steps:

  1. FTP your site
  2. Access this folder: wp-content > plugins
  3. Rename or delete the code-snippets folder

Where did you copy the code from? Did you copy from email? Please copy the code directly from my reply in the forum.


Apologies for the delay - I did copy the code from above. However, I have since managed to fix the problem.