Titel in header.php
-
I have noticed that in theme file I have 2 header.php. First of all I have no clue why I have 2 of them. I guess that is not correct.
Especially I wonder on difference in the title tag. I wonder what the difference it makes on the site. I have always name of the site behind every title, can be this causing this?
-
Hallo Lewis,
I hope you had nice weekend:-)
Unfortunately the error still appeared:-( It just did not want the: require('./wp-blog-header.php')
But was looking for this one in the error require('wp-blog-header.php');
So I did all the steps back as I thought it did not sorted out:-(
-
No problem - Glad I was able to help.
Best of luck in the future!
Lewis -
Thank you very much Lewis! I just did it exactly as you said. I appreciate your time very much. You know I was looking into this already 1week from morning till evening and was quite desperate. Normally this error was in error logs every day, so I will now monitor it in cpanel if it will not appear again. I hope I will never see it as was nearly ready on some medication
Thank you so much Lewis!
-
Sorry, I copied the wrong file path. I meant this one:
public_html/villasdiani.com
-
Thank you very much Lewis,
But here the index.php looks very different:-(
-
Glad it worked!
Yeah, you just need to make the same change to the following index.php file and that will solve that problem too:
public_html/villasdiani.com/wp-content/themes/decorum/index.php
That should get you all up and running.
-
Thank you
-
It should just be the one inside the standard public_html folder as this is what is referenced in the PHP error (/home2/damian/public_html/index.php on line 17).
Hope this helps! Let us know how you get on.
-
Thank you very much Lewis. Now I am not sure which index.php you mean:-( I have so many:-(
-
Hi Iris,
It's hard to debug the problem without being able to see the issue, but it sounds like it's an incorrect file path. Open up your index.php file and find the following:
require('./wp-blog-header.php'); change it to this:
require('wp-blog-header.php');
Hopefully that will help fix your issue!
Lewis
-
Thank you very much Alejandro and Lewis. The reason why I was asking this with header is because I am receiving all this errors regarding the header in hostgator cpanel: So I guess I have screwed up something with header?
[11-Oct-2013 10:46:41] PHP Warning: require(./wp-blog-header.php) [[function.require](function.require)]: failed to open stream: No such file or directory in /home2/damian/public_html/index.php on line 17 [11-Oct-2013 10:46:41] PHP Fatal error: require() [[function.require](function.require)]: Failed opening required './wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/damian/public_html/index.php on line 17 [11-Oct-2013 10:46:41] PHP Warning: require(./wp-blog-header.php) [[function.require](function.require)]: failed to open stream: No such file or directory in /home2/damian/public_html/index.php on line 17 [11-Oct-2013 10:46:41] PHP Fatal error: require() [[function.require](function.require)]: Failed opening required './wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/damian/public_html/index.php on line 17
As regarding of the title tag, I am using yoast seo. So does that basicly mean that I have the name of the site behind every titles. Oh my god I do not want this:-( how can I disable it please?
-
Like Alejandro has explained, the header.phpxxx isn't actually being used. .phpxxx is not a valid php extension, so they've added the xxx in so it isn't used in the wordpress theme.
Looking at the code in header.php, your title tag is here:
<title><?php if( is_home() || is_front_page() ) bloginfo('name'); else wp_title(); ?></title>
This basically means:
If you're on the homepage or on the front page of the website, show the blog name (which is pulled from your wordpress settings). If not, show the wordpress title (this will be pulled from the name of the page which the user is on).
If you wanted to make it so the order of the title page is different, for example, if you wanted your title tag to show 'Page Title Here | Site Name', you could go into your wordpress settings and should be able to change the order in which this is done... Alternatively, download a plugin such as Yoast's SEO plugin and you'll be able to customise everything there!
-
header.php is the valid file showing the head of your page.
header.phpxxx is simply a replacement file, so that in case you modify the header.php you have the option to save the original(header.php) file and replace it for the replacement file (header.phpxxx).dunno if i have explained.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Help.. there was a html and php version of my home page on my server for about a week. Now lost all rankings!
Our home page has disappeared from the Google SERPS completely. It won't even show for a search of our business name although other internal pages appear. Site appears in bing for our keywords but not for our business name. When I republished the site I got a message saying there was a php and html version of the site on the home page. I deleted this immediately but was then advised by another staff member that they had also got that message the week before but not done anything about it - so I think it was out there for about a week. Could this be the cause of the ranking drop? We have also done the following: Checked GWM for robots issue, manual action, crawl errors, blocked URLs - all good. Some crawl errors on other pages relating to broken links. All sorted and marked as fixed. Checked for duplicate content - redirected non www version of site to www Checked back links Removed video from home page that was temporarily unavailable when we did fetch and render Added canonical tag Added H1 tag that was missing Coding checked - all looks good There has been no change to the content of the page. We have fetched and rendered and resubmitted for indexing but it's still not coming back in SERPS it did for a short time the other day and then after a couple of days disappeared again Prior to all this it had ranked really well for our most important keywords for years. It's not a new site. The page is indexed as it comes up when doing a site: search. Please can anyone help? Nobody seems to have the answer and we don't know what else to do. The site is NSFW NSFW https://goo.gl/dwA8YB Main keyword sex toy party
Intermediate & Advanced SEO | | GemmaApril0 -
How do I redirect my old PHP website to my new Java website?
Please could you help? My old website is written in php. I've created a new design of the website in Java. I'll be using the same domain name though. example.com and I'd like to pass my link juice to my new redesigned website. When I turn the domain name to point to my new website how do I make sure pages that are ranked in google that don't exist on my new website transfer 301 from my old website to a similar page on my new website. Old Website Example example.com/bootcampuk.php New Website Example example.com/bootcamps.jsp Many Thanks, Rob
Intermediate & Advanced SEO | | puamethod0 -
72KB CSS code directly in the page header (not in external CSS file). Done for faster "above the fold" loading. Any problem with this?
To optimize for googles page speed, our developer has moved the 72KB CSS code directly in the page header (not in external CCS file). This way the above the fold loading time was reduced. But may this affect indexing of the page or have any other negative side effects on rankings? I made a quick test and google cache seems to have our full pages cached, but may it affect somehow negatively our rankings or that google indexes fewer of our pages (here we have some problems with google ignoring about 30% of our pages in our sitemap".)
Intermediate & Advanced SEO | | lcourse0 -
4 questions about a paragraph of SEO friendly text in my e-com websites header.
Hi guys, I'm trying to understand the SEO behind our websites header. www.mountainjade.co.nz As you can see we have a paragraph of relevant introductory text that is also SEO friendly in our header. What I would like some help with is understanding how google views and assigns 'juice' to information like this in the header or footer of a website. Usually certain pages have content specific to a given topic, and google ranks these pages accordingly. But with a websites header / footer its content appears on every page as the header is always at the top and footer at the bottom. 1. In what way does my website benefit from the paragraph of text in the header? e.g at the domain level? Just the home page? etc etc 2. How does google assign 'juice' to the paragraph of text? (similiar to Q1). 3. How would my website be effected if I moved the text to the footer? (Aesthetic change) 4. When I 'inspect element' on the paragraph, it is labelled 'div id=site description.' Can someone please explain the relevance of a sites description to SEO for me. This paragraph of text was in the websites header before I came onboard, and I've been too concerned to change / move it as I don't know enough about it. Any help would be appreciated! Thanks team, Jake
Intermediate & Advanced SEO | | Jacobsheehan0 -
Removing index.php
I have question for the community and whether or not this is a good or bad idea. I currently have a Joomla site that displays www.domain.com/index.php in all the URLs with the exception of the home page. I have read that it's better to not have index.php showing in the URL at all. Does it really matter if I have index.php in my URL? I've read that it is a bad practice. I am thinking about installing the sh404SEF component on my site and removing the index.php. However, I rank pretty high for the keywords I want in Google, Bing and Yahoo. All of the URLs that show up in the searches have index.php as part of the URL. Has anyone ever used sh404SEF to remove the index.php and how did you overcome not loosing your search engine links? I don't want an existing search showing www.domain.com/index.php/sales and it not linking to the correct page which would now be www.domain.com/sales. I guess I could insert the proper redirects in the htaccess file. But I was hoping to avoid having every page of my site in the htaccess file for redirecting. Any help or advice appreciated.
Intermediate & Advanced SEO | | MedGroupMedia0 -
Does having a file type on the end of a url affect rankings (example www.fourcolormagnets.com/business-cards.php VS www.fourcolormagnets.com/business-cards)????
Does having a file type on the end of a url affect rankings (example www.fourcolormagnets.com/business-cards.php VS www.fourcolormagnets.com/business-cards)????
Intermediate & Advanced SEO | | JHSpecialty0 -
First Link Priority question - image/logo in header links to homepage
I have not found a clear answer to this particular aspect of the "first link priority" discussion, so wanted to ask here. Noble Samurai (makers of Market Samurai seo software) just posted a video discussing this topic and referencing specifically a use case example where when you disable all the css and view the page the way google sees it, many times companies use an image/logo in their header which links to their homepage. In my case, if you visit our site you can see the logo linking back to the homepage, which is present on every page within the site. When you disable the styling and view the site in a linear path, the logo is the first link. I'd love for our first link to our homepage include a primary keyword phrase anchor text. Noble Samurai (presumably seo experts) posted a video explaining this specifically http://www.noblesamurai.com/blog/market-samurai/website-optimization-first-link-priority-2306 and their suggested code implementations to "fix" it http://www.noblesamurai.com/first-link-priority-templates which use CSS and/or javascript to alter the way it is presented to the spiders. My web developer referred me to google's webmaster central: http://www.google.com/support/webmasters/bin/answer.py?answer=66353 where they seem to indicate that this would be attempting to hide text / links. Is this a good or bad thing to do?
Intermediate & Advanced SEO | | dcutt0