On my static pages I usually use php includes, which means I have a header.php and a footer.php file. In my header.php I have everything from <! DOCTYPE ... until the <div> tag that goes right before my content (ie. <! DOCTYPe ...><html><head>meta etc</head><body><div etc>)
using header.php while having original metatags on each page...?
3
On my static pages I usually use php includes, which means I have a header.php and a footer.php file.
In my header.php I have everything from <! DOCTYPE ... until the <div> tag that goes right before my content (ie. <! DOCTYPe ...><html><head>meta etc</head><body><div etc>)
I realized, that this causes the meta tags to be the same on each of my pages, so now I'm wondering if there's a way to work around this.
I'm thinking that I could include <! DOCTYPE ...> <html><head> meta etc... </head> in each of my individual .php files, and then just insert the php include tag after </head>.
I would of course edit my header.php accordingly, and remove everything before <body>..
I need header.php as it includes my menu.
Do you think this sounds like a good idea, or is there a smarter way to achieve the same result?
In my header.php I have everything from <! DOCTYPE ... until the <div> tag that goes right before my content (ie. <! DOCTYPe ...><html><head>meta etc</head><body><div etc>)
I realized, that this causes the meta tags to be the same on each of my pages, so now I'm wondering if there's a way to work around this.
I'm thinking that I could include <! DOCTYPE ...> <html><head> meta etc... </head> in each of my individual .php files, and then just insert the php include tag after </head>.
I would of course edit my header.php accordingly, and remove everything before <body>..
I need header.php as it includes my menu.
Do you think this sounds like a good idea, or is there a smarter way to achieve the same result?
- Manfred Ekblad
- [ 1 ] Thanks
- LK
Next Topics on Trending Feed
-
3