- This topic has 14 replies, 10 voices, and was last updated 7 years, 4 months ago by kerwic.
- AuthorPosts
- November 7, 2016 at 12:50 am #1026SteffiParticipant
Is it possible to re order the sections on the homepage?
I like the layout of the ‘About’ section, but don’t want it at the top of the page.Was thinking maybe creating a child theme with some code in the function file to get the desired effect?
November 7, 2016 at 10:20 pm #1034HashKeymasterNo, There is not option to reorder the section.
You need to make a copy of front-page.php file and then reorder the code.
December 13, 2016 at 8:46 am #1366squirksssParticipantHey there,
I have tried re-ordering the code in the front-page.php but somehow it does not change the order on my website. Are there any more steps that i should do other than the reordering of codes?
December 16, 2016 at 6:59 am #1395SuzyParticipantI’ve been playing with the homepage layout as well, and there’s a file called home-template.php in the templates folder – when I edit that one, my changes show up. Working with front-page.php doesn’t seem to do anything.
December 22, 2016 at 11:03 pm #1440HashKeymasterHi,
It depends on what setting you are on. If the Setting for the Front Page display in Settings -> Reading Menu is “Latest Post” then you need to edit front-page.php file but the setting for Front Page Display is “Static Page” and the selected page has template “Home Page” used then you need to edit template-home.php file.
February 10, 2017 at 4:48 am #1921actionjenParticipantHi Suzy – I don’t see anything re-order on that file (home-template.php)in my editor. Can you share what code you input to reorder your sections? Much appreciated!
March 5, 2017 at 4:32 pm #2202ManuParticipantHi,
I can not find the front-page.php file anymore, and template-home.php file doesn’t list the different sections since the last update. Could you please help so we can re-order the different sections of the home page?
Many thanks,
ManuMarch 7, 2017 at 10:14 pm #2227karatParticipantHi-
I just found out it is now in a file called:
total-functions.php
If you are working with a child theme, paste the below in your functions php and change the order to what you want.
Hope this helps!if( !function_exists(‘total_home_section’) ){
function total_home_section(){
$total_home_sections = apply_filters(‘total_home_sections’,
array(‘slider’,
‘about’,
‘featured’,
‘blog’,
‘portfolio’,
‘service’,
‘team’,
‘counter’,
‘testimonial’,
‘logo’,
‘cta’
)
);return $total_home_sections;
}
}March 10, 2017 at 1:48 am #2285ManuParticipantHi Karat,
Thank you so much for your help, it was exactly what I needed!!!! I’m happy 🙂
Cheers,
ManuMarch 12, 2017 at 8:52 pm #2303BriscohParticipant@Karat
Where do I have to insert the code in functions php?Cheers for helping 🙂
March 13, 2017 at 9:22 pm #2319HashKeymasterHere is how to change the order. In the function.php of child theme add the below code. Now you just need to change the order of the $array
add_filter("total_home_sections", "total_new_home_sections"); function total_new_home_sections($array){ $array = array("slider","about","featured","portfolio","service","team","counter","testimonial", "blog","logo","cta"); return $array; }
June 14, 2017 at 6:04 pm #3089johnson_geetikaParticipantHello HashTheme,
I followed your instructions but this doesn’t work, could you please tell me where exactly to paste this code in the function.php file? Any particular function?
Regards,
GJune 14, 2017 at 7:52 pm #3093HashKeymasterJust paste it at the bottom of the function.php and change the order in the above code.
Thats should work.
July 21, 2017 at 1:41 am #3220kerwicParticipantHi Hash Themes,
I love love love this template but really need to re-order the sections and the above code isn’t doing anything when I put it at the bottom of function.php in child theme.
Can you help, i’m tearing my hair out trying to figure this out!
Thanks,
KJuly 21, 2017 at 2:21 am #3221kerwicParticipanti’ve done it! the spaces once copied and pasted were different. I put a space after each comma and it worked! thanks for the code!
- AuthorPosts
- You must be logged in to reply to this topic.