- This topic has 3 replies, 4 voices, and was last updated 6 years, 10 months ago by plimfec.
Viewing 4 posts - 1 through 4 (of 4 total)
- AuthorPosts
- February 25, 2017 at 1:30 am #2126Arch1Participant
The recent update re-ordered the home page and practically eliminated the home-page-template.php where this could be addressed. How can I reorder sections on the Home Page?
March 13, 2017 at 8:57 pm #2308HashKeymasterHi,
The update still has home-page-template.php but there is a change in code. Here 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; }
March 25, 2017 at 1:04 am #2579allonaParticipantThis code is not working
March 26, 2017 at 4:14 am #2592plimfecParticipantYes, it is working. But pay attention to the quotes, these should be the right ones for PHP to recognize.
This should work:
add_filter('total_home_sections', 'total_new_home_sections'); function total_new_home_sections($array){ $array = array('slider','about','portfolio','service','featured','team','counter','testimonial','blog','logo','cta'); return $array; }
- AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.