1

I am using the code below:

<!doctype html>
<html lang="<?php language_attributes(); ?>" dir="ltr">

<head>
    <meta charset="<?php bloginfo('charset') ?>">
    <meta name="description" content="<?php bloginfo('description') ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <?php wp_head(); ?>
</head>

I have an error in line 1 in firebug sources tab .

Failed to load resource: the server responded with a status of 404 (Not Found)

Now the site is not showing part of the site and footer!!

Thanks for helping.

3
  • 1
    Well, the <!doctype html> was likely not the first line being referenced by Firebug. So check the first resource (JS/CSS file, image, etc.) which might not be properly linked to or it may have already been deleted, or simply doesn't exist. – Sally CJ Apr 4 '19 at 9:26
  • "first resource" - I mean, the corresponding resource. – Sally CJ Apr 4 '19 at 9:34
  • I did not make a change on the site. Suddenly it became like that . now not showing part of the site and footer !! – Mostafa Norzade Apr 4 '19 at 10:50
3

I see a few errors in your code: Your first line:

<html lang="<?php language_attributes(); ?>" dir="ltr">

should actually be:

<html <?php language_attributes();?> dir="ltr">

(notice that you dont need to add lang=. The function does that by itself. That will likely fix the problem)

You didn't add the ; to 2 of your lines in the head:(shouldn't be a problem, but it's good to be consistent)

<meta charset="<?php bloginfo('charset') ?>">
<meta name="description" content="<?php bloginfo('description') ?>">

they should be

<meta charset="<?php bloginfo('charset'); ?>">
<meta name="description" content="<?php bloginfo('description'); ?>">
10
  • And note also errors could appear suddenly, without anything on the server changing, simply by the browser version changing to one that was less tolerant of small errors. – Loren Rosen Apr 4 '19 at 18:49
  • Nice catch on the lang there! +1 (I was too focused on "line 1", lol) 😜 – Sally CJ Apr 4 '19 at 18:55
  • Thanks . But my problem is not resolved, still part of the page and the footer will not be displayed – Mostafa Norzade Apr 4 '19 at 20:33
  • You're going to need to provide more information then, as we can only help troubleshoot with the limited information you've provided. (site link?) Why do you think it's this code that's causing the problem? – rudtek Apr 4 '19 at 22:18
  • Yes, @MostafaNorzade, rudtek is right. You can try a default theme and/or disable all plugins, even if you didn't change anything. Check also the error logs and your site cache (if enabled) - who knows the issue would be solved just by purging the cache. Check also for JS/CSS errors. – Sally CJ Apr 5 '19 at 4:36

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.