Support » Themes and Templates » News Theme – Messed Up Code Distorts Page

  • So last night I was adding some code (an AdSense unit) to Theme Editor and after updating the file the code distorted the page.

    Even after I deleted the code and updated the file once again, it did not revert to the original version. I downloaded the theme code files and replaced them in the Theme Editor, but this did not work. I’m no expert but it doesn’t make much sense to me, since the original code is all there.

    Please help? Here is the website –

Viewing 6 replies - 1 through 6 (of 6 total)
  • You still have major problems:

    Try replacing the header.php file with new copy via FTP (download the theme to your local computer first). If you’ve changed any other theme files — replace those as well — you need to be using a Child Theme to make any changes to the theme. Otherwise all your changes will be lost when the theme is updated.

    So go back and make a child theme now — and move any changes to it.

    Thank you for the insights.

    I actually didn’t make any changes to the code other than the code I added then deleted (so all the validation problems must be present in the original theme file?).

    I replaced the header.php file via FTP. Should be done in “wp-admin” or “wp-content” in my directory? I tried both and neither worked.

    Then, to create a Child theme I uploaded the style.css News theme file to the directory. Once again tried both wp-admin and wp-content and neither fixed the issues. Are there any further changes I need to make in the WP Theme editor? Not sure if this successfully created a Child Theme or not (but site issues remain).

    Thanks for your help and patience as I realize I’m not the most adept at this! Please any further help would be great

    (so all the validation problems must be present in the original theme file?)

    No, at least some of those errors (i.e. missing head and body tags) are definitely not in the original theme files.

    The new, unchanged header.php file should go in the theme folder (news):
    wp-content -> themes -> news -> header.php

    It should replace the old one that is messed up.

    You need to carefully read and follow the instructions for creating a child theme. You do not have one currently on your site. You may want to just delete the news theme you have and reinstall it — as you may well have other files messed up. In that case, don’t worry about replacing the header.php file.

    But if you are going to delete the news theme, first switch to another theme temporarily (i.e. twentyeleven or twentytwelve).

    Hmmm thanks once again but I’m still having problems.

    I switched to another theme, completely deleted “News” and then re-installed and activated. Unfortunately, still having the same issue. I’ve tried different themes, and all of them have the same problems….

    Anyone else?

    Really not sure what to do here. I’ve tried uninstalling and activating several different themes through WP-Admin but the same problems remain. Since every theme is using different code, maybe it’s not a code problem at all?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘News Theme – Messed Up Code Distorts Page’ is closed to new replies.