0

I'm using the Destro theme.

In page.php I copy and remove:

<?php get_header(); ?>

And I insert it into header.php under:

<div id="wrapper_four"> 

It does the job. It displays the banner at the top of the page, but the website appears white. It's just raw html without CSS or images.

1

You don't want to do that. When someone looks at a page on your site, WP chooses page.php to show it (that's a bit of a simplification, but is fine for this explanation).

page.php needs that call to get_header() to include the header.php file, which in turn will not only display the visible header of the site but usually will contain everything necessary for building the <head> section of the HTML document, including linking to stylesheets. By removing that line from page.php you have prevented WP from creating the whole of that part of the page.

Additionally, you don't want to edit a third party theme as any later updates will overwrite your edits. Any changes you want to make should use a child theme.

The best advice is that you should choose a theme that already has the header where you want it. If for some reason that really isn't possible then creating a child theme can at least let you adjust things with some level of future proofing.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.