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
-
Does Google index language flags/links in header, even if only 1 is visible at a time?
Hi, I want to pass link juice from my English website to my other languages. Does Google index language flags/links in header? Only 1 flag is visible at a time, and from what i´ve read, Google does not index content that is not visible to the user without clicks, like content behind tabs. I´m guessing language drop downs could fall under the same category as well...? Any knowledge on this... thank you for your time!
Intermediate & Advanced SEO | | guidetoiceland0 -
What's the best way to deal with deleted .php files showing as 404s in WMT?
Disclaimer: I am not a developer During a recent site migration I have seen a bit of an increase in WMT of 404 errors on pages ending .php. Click on the link in WMT and it just shows as File Not Found - no 404 page. There are about 20 in total showing in webmaster tools and I want to advise the IT department what to do. What is the best way to deal with this for on-page best practice? Thanks
Intermediate & Advanced SEO | | Blaze-Communication0 -
Duplicated Content with Index.php
Good Afternoon, My website uses Joomla CMS and has the htaccess rewrite code enabled to ensure the use of search engine friendly URLs (SEF's). While browsing the crawl diagnostics I have found that Moz considers the /index.php URL a duplicate to our root. I will always under the impression that the htaccess rewrite took care of that issue and obviously I would like to address it. I attempted to create a 301 redirect from the index.php URL to the root but ran into an issue when attempting to login to the admin portion of the website as the redirect sent me back to the homepage. I was curious if anyone had advice for handling the index.php duplication issue, specifically with Joomla. Additionally, I have confirmed that in Google Webmasters, under URL parameters, the index.php parameter is set as 'Representative URL'.
Intermediate & Advanced SEO | | BrandonEML0 -
Using Meta Header vs Robots.txt
Hey Mozzers, I am working on a site that has search-friendly parameters for their faceted navigation, however this makes it difficult to identify the parameters in a robots.txt file. I know that using the robots.txt file is highly recommended and powerful, but I am not sure how to do this when facets are using common words such as sizes. For example, a filtered url may look like www.website.com/category/brand/small.html Brand and size are both facets. Brand is a great filter, and size is very relevant for shoppers, but many products include "small" in the url, so it is tough to isolate that filter in the robots.txt. (I hope that makes sense). I am able to identify problematic pages and edit the Meta Head so I can add on any page that is causing these duplicate issues. My question is, is this a good idea? I want bots to crawl the facets, but indexing all of the facets causes duplicate issues. Thoughts?
Intermediate & Advanced SEO | | evan890 -
How do i redirect www.domain.com/ to www.domain.com/index.php
I keep getting in my analytics www.domain.com/ and www.domain.com/index.php how do i make it consistently redirect to one version and not to both. I know about htaccess redirect and am already using this so am puzzle to which is the best one to use. below is the example .htaccess file im using. Options +FollowSymlinks
Intermediate & Advanced SEO | | mattmillen
RewriteEngine on
rewritecond %{http_host} ^domain.co.uk [nc]
rewriterule ^(.*)$ http://www.domain.co.uk/index.php$1 [r=301,nc] which is better for SEO should i forward to www.domain.com/ or www.domain.com/index.php0 -
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 -
Why does this show up in my browser/index2.php
i type is a clients site and BOOM...it suddenly ends with "index2.php" who will link to that? I can't seem to make it not appear...according the template creator... Is this "index2.php" affecting my link juice?
Intermediate & Advanced SEO | | SEObleu.com0 -
My site has multiple H1's, one in the logo image and one as a header. Is there any official stance from the search engines on this?
In doing some research on this issue, I came across this blog post which seems to suggest it certainly will be a trigger to search engines. http://www.seounique.com/blog/multiple-h1-tags-triggers-google-penalty/ Could be a false positive on his specific case, but I was wondering what the community thought. Thanks in advance!
Intermediate & Advanced SEO | | jim_shook0