• Resolved tlawork

    (@tlawork)


    I am using the HARMONIC theme and I have the need to change the order of the home page and swap the order of NEWS and PAGE. I found a solution in forums that the change should be made in templates/front-page.php. In the same article it cautioned to not change the theme but create a child theme – fine.

    So I created a child theme using tutorial – and created style.css, functions.php, and templates/front-page.php – modified the template and – IT DID NOT WORK.

    After some trial and error I gave up and just modified the theme – I changed the order of the NEWS and PAGE code in the template. But it does not work either – the order stays the same. It is not a cache problem I loaded in brand new browser and hit refresh several times.

    SO I guess the question is – my child theme did not work but neither did editing the main theme – so obviously I missed the right place to modify. Can someone advise how to SWAP the order of NEWS and PAGE so that the order is:

    TITLE
    PAGE
    NEWS

    WIDGETS
    PORTFOLIO

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter tlawork

    (@tlawork)

    update – I use godaddy WP hosting and found the FLUSH CACHE option – and that too did not help. I’ve modified the template to change the order but it does not result in any change. Is there another cache that I might not be aware of?

    Hi there,

    Here’s a quick link to the most current version of the front-page.php file so we have a common starting point as a reference.

    You can see the code there, and also use the Original Format download link at the bottom of the page to download the actual php file later if needed.

    For this template, the order that the items are displayed on the page begins at line 89.

    You’ll want to swap the order of the news (starting at line 94) and front page (starting at line 98) sections in your child theme’s file.

    So instead of what is in the original file from lines 94 to 100, use this:

      if ( 1 != $front_page ) :
        get_template_part( 'content', 'front-page' );
      endif;
    
      if ( 1 != $front_news ) :
        get_template_part( 'content', 'front-news' );
      endif;

    Making those changes should allow your child theme to show sections in the order you prefer.

    Here’s what it looked like (small/zoomed out screenshot) on my test site once I made the same changes.

    Thread Starter tlawork

    (@tlawork)

    David C – you are awesome.

    I realize now I was just moving the declarations above it around but thats not where the actual writing of the HTML was happening. Thanks a LOT!!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘harmonic child theme attempt to overwrite template not working’ is closed to new replies.