Should I use PHP for header and footer?

Elect

New Member
so it will appear to be there as SE spam, which if you were honest with yourself ... it is.

I don't know if it's spam or not. The way I see it, it is a way to let people know that I work in their town. If there is a better way to do that, I am all ears, and I am not being sarcastic when I say that. I work in about 15 towns and I would like the best way to let people know that and have my company website come up when they search for an electrician in my town.
 

Frank

New Member
using includes or not is nothing to do with SEO

That was not the question. The question was *how* to use includes. Do you use one file with a head, header, nav, side and footer over and over again, and include a new article for every new page, or do you give each article file a head, and include the header, nav, side and footer.

To be able to give each page a different <title> and meta description, you should use the latter method.
 
Last edited:

AsheSkyler

New Member
Since SEO is up, I gotta 'nother question. Would it be a good idea for Elect to reupload all the old .html files but with a 301 permanent redirect in each pointing to their corresponding .php replacements?

Now I need to go back and rethink my footer navigation too. I always assumed the reason why other sites did that was to make it easier for visitors when the page was long, just like how some simply have a "return to top" link, and the reason that sites like MySpace had all that extra junk in the footer was because they were trying to be even more helpful because their site was so big and complex. But it seems footer navigation makes you look shady to the crawlers. Quite honestly, the only time I was ever concerned about SEO was when I found out search engines grabbed random content from my site for the little blurb under the link on the results page. My only focus then was to have a proper description tag so it'd make more sense to what 3-5 people ever search for it.

To be able to give each page a different <title> and meta description, you should use the latter method.

You can still have unique titles, descriptions, meta keywords, and anything else by using echoes on the template file and assigning a value to the corresponding $thingies on the body file before "include template". No different than how echoing $content works.
It's just a matter of which way your lazy falls. You can use quite a few files and avoid the apostrophe/quote problem, or you can only worry about two files (three, counting the stylesheet) per page but watch your apostrophes and quote marks. Contact forms with PHP involved get mighty interesting the second way.

(I know it's hard to take somebody serious who uses words like "thingie". Just go with it. :p )
 

Elect

New Member
Since SEO is up, I gotta 'nother question. Would it be a good idea for Elect to reupload all the old .html files but with a 301 permanent redirect in each pointing to their corresponding .php replacements?

A 301 redirect goes in the .htaccess file. The old pages aren't required to still be there.
 

Frank

New Member
So why did YOU bring SEO into the thread?
Because SEO has everything to do with giving each page its own <title> and description, and I didn't understand then that AsheSkyler did that, too (see the below message).
 
Last edited:

Frank

New Member
You can still have unique titles, descriptions, meta keywords, and anything else by using echoes on the template file and assigning a value to the corresponding $thingies on the body file before "include template". No different than how echoing $content works.
It's just a matter of which way your lazy falls. You can use quite a few files and avoid the apostrophe/quote problem, or you can only worry about two files (three, counting the stylesheet) per page but watch your apostrophes and quote marks.

Only now do I see that you, too, gave each page its own title and description. Upon first reading your first message, I missed this sentence or it didn't sink in:

My own files are a bit more lengthy since I assign each page it's own title, keywords

My apologies. Still, I would prefer the traditional method, because in your method the content text all gets one color in the code editor. I like the code coloring feature most code editors have nowadays. But it is always good to have two options; under certain circumstances, yours might well be my method of choice, too.
 
Last edited:

chrishirst

Well-Known Member
Staff member
Because SEO has everything to do with giving each page its own <title> and description, ....

No it hasn't, certainly it is useful if documents do have unique content in the title element. But it is NOT "everything".

Same with the content attribute of the document meta description element, it doesn't have to even be filled in, never mind be "different"
 

Frank

New Member
No it hasn't, certainly it is useful if documents do have unique content in the title element. But it is NOT "everything".
Don't put words in my mouth that I didn't use. I didn't say it *was* everything. I said it has everything to do with.

Same with the content attribute of the document meta description element, it doesn't have to even be filled in, never mind be "different"
It indeed doesn't, but it sure helps. Assuming equal numbers of external links to the three sites, the site with the search term in the title will come out on top, the one with the search term in the meta description tag will come out second, the other one third.
 

chrishirst

Well-Known Member
Staff member
If it were that simple.

The meta description content is NOT used for anything other than the text snippet, should Google decide to actually use it.

Words in the meta description are NOT used by Google for search term weighting.
 

Elect

New Member
If it were that simple.

The meta description content is NOT used for anything other than the text snippet, should Google decide to actually use it.

Words in the meta description are NOT used by Google for search term weighting.

Are you sure about that? A lot of people have told me differently.
 

chrishirst

Well-Known Member
Staff member
Are you sure about that? A lot of people have told me differently.

Yes, there are plenty of "experts" talking all kind of bollocks!!!!

It's simple enough to test, invent a word make sure there are no results, put it in the meta description content ONLY, see if it appears in the index.
 

AsheSkyler

New Member
My apologies. Still, I would prefer the traditional method, because in your method the content text all gets one color in the code editor. I like the code coloring feature most code editors have nowadays. But it is always good to have two options; under certain circumstances, yours might well be my method of choice, too.

No worries, man. Two files are simpler for the most part, and probably should be recommended for most people. Since I guinea pig my site often, it's just easier for me to assign different values on one file (like the stats for a story's character bios) and then go crazy with the placement on the main file.

And, yeah, I agree that color thing gets annoying if you have a lot of tags or comments to keep track of besides the break and paragraph tags.
 

Frank

New Member
chrishirst said:
It's simple enough to test, invent a word make sure there are no results, put it in the meta description content ONLY, see if it appears in the index.
That's cheating, because you know all too well that text in a description tag must also be in the article for Google to do something with it.

chrishirst said:
But it DOESN'T mean it is used for search term weighting in the results.
I don't give a rat's ass what exactly Google uses it for. If Google itself advises to include a proper description, people should do that. End of story.
 

chrishirst

Well-Known Member
Staff member
That's cheating, because you know all too well that text in a description tag must also be in the article for Google to do something with it.
Thereby proving that it does not help with "ranking" which is what your post suggested.
 

Frank

New Member
Thereby proving that it does not help with "ranking" which is what your post suggested.
No, it doesn't prove that at all. What this does prove, however, is that you (only) read what you want to read, not what is written, or only part of it. I already said that I don't give a rat's ass what exactly Google uses it for. They advise, we should do it. End of story. And end of discussion.
 
Last edited:
Top