Support » Fixing WordPress » Apply theme formatting from dev site to main site

  • Resolved jochundesign

    (@jochundesign)


    I was commissioned to build a new homepage (along with a new header and footer) for a client but it couldn’t interfere with their existing live site. So I created a subfolder, installed WP and my chosen theme in there and built the new homepage etc. Now I need to replace the existing homepage, header and footer with my new designs; what’s the best way to do this?

    I fear I may have complicated matters by using a different theme than what the current live site uses 🙁

    Any help/suggestions greatly appreciated!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello Jochundesign – you’re correct – this probably wont work like you’re thinking because the theme would need to be the same theme as the live one. All of your CSS classes and PHP functions will be different. It simply wont work properly unless you call that home page to display a totally different CSS file and reference different content.

    I would suggest using the same theme (even same version) of their current website and adjusting things in a staging environment. Then you would need to coordinate with the client for a “content freeze” so that you can quickly get into the live site and apply the new layout.

    You’ll want to be certain to have a current backup of their website in case anything goes wrong. You’ll need to restore the website immediately – so have that game plan in place.

    Moving forward – using a WordPress hosting company that offers staging environments is highly recommended.

    If you have access to the current site you can create a custom homepage custom header and custom footer. If you then set this page as the home page in the settings it will not effect the site at all –

    By default WordPress uses the template page front-page.php If the theme does not have that template you can add it by creating the new page and pasting everything from index.php into it. (You should create a child theme so changes don’t get erased if the theme is updated)

    Create a header-home.php and footer-home.php and in the front-page.php template file you just call them instead of the default header and footer like this

    
    <?php get_header( 'home' ); ?>
    
    <?php get_footer( 'home' ); ?>
    

    Oh, sorry, I misunderstood the question… Yeah, no you can not do it that way. You can not use a header and footer from another theme on that site. The header and footer have to be created in that theme using it’s function and css. You can however create a new page and make it password protected and load conditional css to just that page until the design is completed then replace the current css with your changes.

    Best option is to do a full site backup and work on the changes locally, then replace the live site with your changes.

    Thread Starter jochundesign

    (@jochundesign)

    Thank you both for your help, I now know what I have to do. And I’ve learnt a lesson for next time!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Apply theme formatting from dev site to main site’ is closed to new replies.