Display more than 4 services on the home page.
This support request was posted in Paeon by brianmoes
- brianmoes July 12, 2016 at 12:42 pm
Hi,
In a previous version of the theme I was able to show more than 4 services on the home page by doing the following:
edit the file template-home.php and modify the limit in the services query to change that. Where it says ‘posts_per_page’ => 4, change the number to 8.
Since updating to 1.1.6 this is no longer working. Can you give me some advice on how to get this working please.
Thanks
Brian
Juanfra Aldasoro July 12, 2016 at 2:02 pmHello Brian,
Thank you for writing, I hope you are doing well.
We highly recommend you to use child themes when customizing a theme.
In the recent versions we have added a filter, so the number of services on the home page can be changed without touching the template.
You can find the code to do that here: https://gist.github.com/juanfra/c4dd6ee3aca27231cf53
Best,
Juan.brianmoes July 13, 2016 at 11:43 amHi Juan,
Thanks very much for this. I have added it to the child theme functions.php file and it is working well. In the previous theme it would goto a new line once 4 columns had been used. I notice in this new version of the theme it is listing all the services on a single row. I there a way to get it to go to a new line after 4 rather than just listing all service in the same row.
i.e. http://www.growonchildrensot.com.au/growonchildrensotcom/new/
Juanfra Aldasoro July 13, 2016 at 2:09 pmHi Brian,
Thank you for the follow up.
Well, the amount of columns per row is given via CSS. Try to add the following line of CSS in your custom css file, or in the stylesheet of you child theme:
.home-service ul { display: block; }
Best,
Juan.brianmoes July 27, 2016 at 4:46 amHi Juan,
Thanks for the suggestion. I have added this one in and it does not seem to have made any difference.
Did you have any other suggestions?Thanks
Brian
Juanfra Aldasoro July 27, 2016 at 1:32 pmHi Brian.
Thank you for the follow up. I´m happy it is all sorted now.
Have a nice day,
Juan.
You must be logged in to reply to this topic.