Home Forums Total Recent Update Changes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2126
    Arch1
    Participant

    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?

    #2308
    Hash
    Keymaster

    Hi,

    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;
    }
    #2579
    allona
    Participant

    This code is not working

    #2592
    plimfec
    Participant

    Yes, 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;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.