This is the main post for the Add Your Own Headers Wordpress plugin.
This plugin allows you to add tags to the header of an individual page or post such as keywords/descriptions, custom meta tags, external style sheet links, or embedded style tags. You no longer need to use conditional
statements or separate templates just to change something like a background image, text style, etc.
<script type='text/javascript' src='http://yourdomain.com/prototype.js'></script> or <link rel="stylesheet" href="http://yourdomain.com/yourstyle.css" type="text/css" media="screen" />
June 12th, 2007 at 7:34 am
> how to unwrite the preconfigured head
Can you clarify this?
July 1st, 2007 at 11:20 pm
Thanks for this plugin. Is it possible to pass a PHP variable this way, such as ?
July 1st, 2007 at 11:20 pm
… $section = “home”;
July 2nd, 2007 at 7:25 am
Hi Edward, this is not possible, what you enter is simply put without evaluating it.
November 6th, 2007 at 6:53 am
[…] Add Your Own Headers - This plugin allows you to add tags to the header of an individual page or post such as keywords/descriptions, custom meta tags, external style sheet links, or embedded style tags. You no longer need to use conditional statements or separate templates just to change something like a background image, text style, etc. […]
November 24th, 2007 at 7:11 pm
[…] http://wp.uberdose.com/2007/03/30/add-your-own-headers/ […]
November 28th, 2007 at 8:59 pm
[…] Please go to the official main page. […]
November 28th, 2007 at 10:38 pm
great, great, GREAT!
Works perfectly. Thank you SO much!
December 3rd, 2007 at 8:44 pm
It’s nice. I would give the plugin a different name though. It wasn’t directly clear to me wat it would do… and I’m not alone here as i read.
Maybe ‘Add you own content’ or something.
December 3rd, 2007 at 8:45 pm
‘Add your own HEAD content I mean
December 6th, 2007 at 3:45 pm
Hi,
I wanted to add a special header-image to one page of my template.
so I inserted
with “add your own headers”.
Now the custom-css appears before the template-css and is overwritten by the standard header-image.
What must I do?
(I am using WP 2.3.1 with K2-Template RC3)
December 6th, 2007 at 7:22 pm
@Thorsten: Please post that again with entities on <
December 6th, 2007 at 8:29 pm
I wanted to add a special header-image to one page of my template.
so I inserted “” with “add your own headers”. Of course with my domain and the correct path.
Now the custom-css appears before the template-css and is overwritten by the standard header-image.
The sequence is in this ordering now:
1. K2-Theme: style.css(K2-basis)
2. add-your-own-header.css (with new background url)
3. the specific K2-style css with the normal header-image URL in it.
What must I do? so that (2.) added css is sequentially loaded after (3.)specific K2-Style-css??
(I can see the ordering from Firefox-Webdevelopper)
(I am using WP 2.3.1 with K2-Template RC3)
December 6th, 2007 at 8:35 pm
“” means of course “link rel=”stylesheet” href=”http://yourdomain.com/yourstyle.css” type=”text/css” media=”screen” /”
December 7th, 2007 at 6:07 am
@Thorsten: If you are dependent on the order of style sheets you can try to move the call to wp_head() after the K2 css. Which btw. always should be the way otherwise wp_head() doesn’t make much sense as in your case.
December 13th, 2007 at 9:29 pm
THANK YOU! THANK YOU! THANK YOU!!!!!
This is exactly what I needed to attach my external style sheets and change the look of individual pages. I’m surprised this isn’t built into Wordpress, it’s silly to be able to assign or switch themes when it’s just far easier to apply a different style sheet and call it good.
WP Advanced Coder - 7
January 1st, 2008 at 12:43 pm
I’m trying to enter this into the custom header field:
.header { background-image: url(header.jpg); }
in my themes style sheet the header div is written like a class (eg .header) not as a id (#header).
so that is why i have .header. i tried the path also as img/header.jpg and /img/header.jpg.
and it is not working. the path is not an issue here so please don’t suggest that as the reason.
thanks
January 1st, 2008 at 12:47 pm
@dreedenator: This is valid CSS but not valid in the header (html). Surround it with an according style tag and it should work.
January 1st, 2008 at 6:46 pm
yes thank u for you response but it is in a style tag it just didn’t show in my post
January 1st, 2008 at 8:34 pm
ok, i managed to get somewhat of a result on a different page of my wordpress site (i was previously trying to implement this on the blog area) …. however my new header still doesn’t appear in fact no image appears…just the background color set for that area.
January 1st, 2008 at 8:49 pm
finally, I got it to work by creating a separate style sheet with just the same class .header with the new image info and deleted the rest of the stylesheet and then i did a link to that style sheet in wordpress custom header field and i put it on all the pages and my blog area takes the default (my blog area is set not to be on home page)
January 19th, 2008 at 8:28 am
Hi, will this allow me to have an image preceding my headers for each post? I had seen this on another blog and liked the look of that.
Thanks!
bs
January 19th, 2008 at 10:28 am
Hi KAPS, This is what I originally wanted to use this plugin for and it works great. All you have to do is add a div to your template where you would want the image to appear and assign that div an ID like “image_banner” or whatever. (If you want the image banner to go all the way across the top of the page, then i would add this div to the bottom of your header.php file.) Then create a separate css style sheet for each different image banner (greenbanner.css, redbanner.css, etc.), setting the background image of the image_banner div to the image you want to insert like so: #image_banner { background-image: url(…) no-repeat 0 0;height:200px;width:700px;margin:0;padding:0; }. Obviously, you’d need to insert the correct height, width and image URL attributes for the div. Then through the “add your own headers” interface, you can add a css call to retrieve the style sheet that contains the specs for the image banner you want to insert. This will allow you to insert different image banners on different pages without any major hack to the template. If there are pages where you don’t want an image banner to appear, you can always set your default css to have the image_banner div have a “display:none;” attribute. That way that div disappears from view unless you specify otherwise on a page basis. Any new css call you insert in the header will overwrite this since it comes after the original call. Make sense?
January 19th, 2008 at 4:33 pm
Of course it makes sense! To you… LOL, Actually, it even makes sense to ME which is even scarier. I like the fact that I can use a diff CSS for each, that way I can have a different image for each of my categories.
Thanks for the reply and the instructions, I’ll report back on my progress.
January 22nd, 2008 at 12:05 pm
[…] Plugin Homepage […]
February 8th, 2008 at 6:47 pm
How would I go about adding an image to the header? I’m not so sure I understand this correctly. Do I just put the source for the image? Seems like there is more to it… and I’m not wrapping my brain around this. lol Thanks in advance…
February 8th, 2008 at 6:53 pm
@Erik: You usually define a background image via CSS, either with add your own header or directly in your template. For the syntax please refer to the WP default theme’s style.css. For an idea how to add this on the fly see its header.php.
February 8th, 2008 at 7:18 pm
Thanks uberdose. Ok, I realize this is WAY beyond my comprehension. lol I haven’t touched my css pages and do not know php. I basically want to add an image header to my Wordpress site. I have the file uploaded to my serve. I just need to know what code to put where.
February 8th, 2008 at 8:34 pm
Nevermind… I cannot edit css pages anyway since they are themes designed by others. GRR.
February 8th, 2008 at 9:42 pm
@Erik: Something like this should do the trick:
<style type="text/css" media="screen">#header { background: url("path.to.your.jpg");}</style>February 25th, 2008 at 2:07 pm
How is this plug-in working actually? How is he telling the CSS file or the header file to overwrite their default setting and put the custom header in the exact same place?
Is this plug-in made for a specific theme?
It would be nice to make it work
February 25th, 2008 at 7:45 pm
@Momu: It’s a plugin for inserting additional header tags on posts/pages. E.g. you can pull in additional CSS files etc or insert new styles. It’s for all themes, provided they are well-behaved and call wp_head() at the right time.
February 29th, 2008 at 8:53 pm
I’m using WP 2.3.3 and a theme called Seashore that utilizes a div called ‘Splash’ that designates a header.jpg image to be displayed there. The image is actually in the <body area and not associated with the header.php area where the logo and menu would be displayed. This ’splash’ image shows up right below the menu. Now, what I want to do is have a different ’splash’ image displayed on the respective pages (i.e. About, Contact, blah blah).
In the style.css file there’s this:
/* Splash */
#splash {
background:url(img/header.jpg) no-repeat center;
height:180px;
width:900px;
border:#ddd 3px solid;
margin:10px auto; /*Splash’s redeclared in functions.php for WP 2.1 or greater */
}
Now, note that there’s a comment that it’s also redeclared in the functions.php file which contains this section:
define(’HEADER_TEXTCOLOR’, ”);
define(’HEADER_IMAGE’, ‘%s/img/header.jpg’); // %s is theme dir uri
define(’HEADER_IMAGE_WIDTH’, 900);
define(’HEADER_IMAGE_HEIGHT’, 180);
define( ‘NO_HEADER_TEXT’, true );
Which seems to supercede whatever is placed in the .css file. If I remove that image reference in the ‘define’ tag then no image displays.
So, my problem is.. how can I utilize this plugin and have a different ’splash’ image show up from page to page? Thanks in advance for your help.
April 1st, 2008 at 8:24 pm
Hello uberdose. I’m not sure if you got my email, but in case you didn’t, I’d like to know if it would be possible for this plugin to be updated for 2.5. When I have it enabled, it messes up the bottom half of my “Write” page, and comments are disabled on my posts.
Also, would it be possible to add an option for adding headers to the category pages? I’d be glad to donate if was, I absolutely love this plugin.
-Jud
April 2nd, 2008 at 7:31 am
@Jud: I will make it compatible for 2.5 but I haven’t found the time to do so so far
Maintaining category information in Wordpress is a real pain (unless I have missed something) so this won’t be a feature until there is an easy way to store category related information. Maybe I should take a look at the 2.5 API.
April 2nd, 2008 at 6:45 pm
@Jud: Just released 0.3 with updated GUI for WP 2.5. Let me know whether that works for you.
April 2nd, 2008 at 8:20 pm
Thank you for the update…but I still have the error… Is it showing correctly on your end?
This is what it looks like:
http://www.simprograms.com/images/misc/wp_headerplugin_error.jpg
I do appreciate how quick you are on this!
April 2nd, 2008 at 8:22 pm
Oh, and did create a test post, the plugin is still disabling the comments (I suppose due to some reason with the bottom half of that page)
April 4th, 2008 at 1:33 am
With this plugin can I get pages to display a specific category?. It is important that the pages show up in in the navigation menu without having to manually hack it to work.
Why? Despite the fact you can create custom category templates - you still can’t make them show in your navigation menu unless you force it to do so.
In essence, I have 5 completely blank Pages and I want
Page 1 to show “ALL category 1 posts”
Page 2 to show “ALL category 2 posts”
Page 3 to show “ALL category 3 posts”
Page 4 to show “ALL category 4 posts”
Page 5 to show “ALL category 5 posts”
Can I use this plugin to do this?
PS, I am rather new to Wordpress and this is my latest stumbling block.
I have used http://aralbalkan.com/1016 (inline posts) with success, but it’s not able to post things automatically.
Thank-you!
April 4th, 2008 at 8:48 am
Hello John A,
You can use the NAVT plugin to do what you are describing above. See: http://wordpress.org/extend/plugins/wordpress-navigation-list-plugin-navt/#post-814
April 11th, 2008 at 11:55 pm
Does anybody else who uses “Add Your Own Headers” with 2.5 get the following error:
http://www.simprograms.com/images/misc/wp_headerplugin_error.jpg
As well as comments being disabled? I was reading the plugin’s code trying to find out if there is an error but I’m not experienced to know what to look for.
April 12th, 2008 at 2:55 am
Hey, fixed my own problem…Learnt how to do Page Templates so I got my headers working again!
April 27th, 2008 at 10:24 pm
I don’t know what I’m doing in wordpress, but it looks like this plugin might help. I am trying to create a page in which the only difference from the normal page template is the text that goes in the header, which is from the blog info. I want to put some static text in for that one page, that’s it. My theme is BlixKrieg 2.3.1
April 28th, 2008 at 5:44 pm
I don’t know if I have the same question as Bruce’s (#53) …
I love this plugin. BUT, I want it to add the meta description tag ONLY to actual post pages, not to my main page, which lists the 20 most recent posts.
Currently, the plugin puts the most recent post’s meta tags on my main page, too. Can I turn that off? I have a conditional statement in my template that puts unique meta tags on the main page only, and leaves it off everything else. If you’re interested, here’s the code I used:
SO, how do I modify the plugin so that it doesn’t return the most recent post’s meta description for the main page?
Thanks!
April 28th, 2008 at 5:46 pm
Oops … here’s the code I talked about (I hope):
April 28th, 2008 at 5:48 pm
One more try, using Java:
[code lang=”java|ruby|sql|css|xml”]
[/code]
May 10th, 2008 at 10:26 pm
Thanks for this. Weird problem: works perfectly in firefox (I’m using 3 beta), but doesn’t seem to be working in safari (3.0.4) Thoughts?
May 20th, 2008 at 7:32 am
[…] Add Your Own Headers This plugin allows you to add tags to the header of an individual page or post such as keywords/descriptions, custom meta tags, external style sheet links, or embedded style tags. (tags: wordpress plugin) […]
May 27th, 2008 at 2:39 pm
[…] Autor: uberdose - Download & Info (engl.) […]
June 4th, 2008 at 1:28 pm
That’s just teh plugin I was looking for. Thanks!