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
-
Is there anything I need to worry about if... We show/hide header navigation based upon visit from external traffic?
Scenario: So imagine if LinkedIn turned off their main navigation/header if you landed on your personal profile via a search engine or via an external link. But if you were on LinkedIn when you found it, the navigation remains the same.
Intermediate & Advanced SEO | | mysitesrock0 -
How to 301 Redirect /page.php to /page, after a RewriteRule has already made /page.php accessible by /page (Getting errors)
A site has its URLs with php extensions, like this: example.com/page.php I used the following rewrite to remove the extension so that the page can now be accessed from example.com/page RewriteCond %{REQUEST_FILENAME}.php -f
Intermediate & Advanced SEO | | rcseo
RewriteRule ^(.*)$ $1.php [L] It works great. I can access it via the example.com/page URL. However, the problem is the page can still be accessed from example.com/page.php. Because I have external links going to the page, I want to 301 redirect example.com/page.php to example.com/page. I've tried this a couple of ways but I get redirect loops or 500 internal server errors. Is there a way to have both? Remove the extension and 301 the .php to no extension? By the way, if it matters, page.php is an actual file in the root directory (not created through another rewrite or URI routing). I'm hoping I can do this, and not just throw a example.com/page canonical tag on the page. Thanks!0 -
H2 header on MOZ bar showing 2,451 # of Characters
My page is Real Estate Listing Service on Wordpress. My H2 header shows 2,451 Characters.... It is picking up my property listings, is this a problem from an SEO standpoint? Any help would be greatly appreciated, and thank you inadvance If required: the website is www.latinproperties.com
Intermediate & Advanced SEO | | LatinProps0 -
How does Google treat Header tags now? H1s, H2s and H3s. What happens if you skip the H2?
The theme I am using now means each page on my is currently set up like this: h1> keyword phrase keyword phrase The new theme I want to use is different h1> keyword phrase Will changing the theme have a negative effect on the rankings due to losing the h2 on each page?
Intermediate & Advanced SEO | | brianflannery0 -
HTTP Header Canonical Tags
I want to be able to add canonical tags to http headers of individual URL's using .htacess, but I can't find any examples for how to do this. The only example I found was when specifying a file: http://www.seomoz.org/blog/how-to-advanced-relcanonical-http-headers N.B. It's not possible to add regular canonical tags to the of my pages as they're dynamically generated. I was trying to add the following to the .htaccess in order to add a canonical tag in the header of the page http://frugal-father.com/is-finance-in-the-uk-too-london-centric/, but I've checked with Live HTTP headers and the canonical line isn't showing : <files "is-finance-in-the-uk-too-london-centric="" "="">Header add Link "<http: frugal-father.com="">; rel="canonical"'</http:></files> Any ideas?
Intermediate & Advanced SEO | | AndrewAkesson0 -
Too early? Rebuilt website from .asp to .php... Internal pages not ranking at all!
Am I jumping the gun on expecting results? I recently switched our ecommerce website from .asp to .php (new site went up May 15th) but we did not switch domain names. we seems to be doing better until a few days ago when traffic took a steep drop... (not like we were getting that much in the first place either) I was wondering if I'm doing something completely wrong or do i need to wait longer? Are big swings normal when relaunching a website? am I just being too anxious? The internal pages are getting no juice and I dont know why... I know i need to build on the links to the site? but am I doing something else completely wrong to see the orgranic search results drop down to almost nothing? I'm really new to SEO and would love if i could get another opinion on http://www.moondoggieinc.com. Thanks! Kristy
Intermediate & Advanced SEO | | KristyO0 -
How get rid of duplicate content, titles, etc on php cartweaver site?
my website http://www.bartramgallery.com was created using php and cartweaver 2.0 about five years ago by a web developer. I was really happy with the results of the design was inspired to get into web development and have been studying ever since. My biggest problem at this time is that I am not knowledgable with php and the cartweaver product but am learning as I read more. The issue is that seomoz tools are reporting tons of duplicate content and duplicate title pages etc. This is likely from the dynamic urls and same pages with secondary results etc. I just made a new sitemap with auditmypc I think it was called in an attempt to get rid of all the duplicate page titles but is that going to solve anything or do I need to find another way to configure the site? There are many pages with the same content competing for page rank and it is a bit frustrating to say the least. If anyone has any advice it would be greatly appreciated even pointing me in the right direction. Thank you, Jesse
Intermediate & Advanced SEO | | WSOT0 -
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