Display more than 4 services on the home page.

This support request was posted in Paeon by brianmoes

Request ID #7218 In Progress
  • 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

    Hello 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.

    Hi 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

    Hi 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.

    Hi 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

    All sorted now Juan. Thanks for your help.

    Juanfra Aldasoro

    Hi Brian.

    Thank you for the follow up. I´m happy it is all sorted now.

    Have a nice day,
    Juan.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server