Wp Unique Article Header Image Plugin for Wordpress
September 22nd, 2008Posted by brajesh
hi all.here I am back with another brand new plugin to enhance your blog.Ok,If you have ever thought of the following,then this plugin is for you.
- You wanted to show unique header image on each single article page of your wordpress(or may be on some of the single article pages)
- You wanted to have a unique background image for each of your single article page(or may be just on some of them)
If your answer is yes,Then this plugin is for you.It allows you to upload an image using the wordpress new post/edit post/page window.It adds a file uploading button just below the title of the post as shown below
![]() |
Now select an Image and when you click publish/save the default image is changed with the current image.
![]() |
Once you click save/publish,Go to manage->posts->your post and click to edit.you will see that the default image is changed with the new image uploaded.
![]() |
How to use
For your use there is a method gt_get_image_url(), it returns unique image associated with each post.you may use it in any way you want.here is an example,how I modified the default theme on the demo server to show unique header images on each post.
Now,let us edit our themes header.php to make use of unique header on each of the page.we add following snippet of code to our header .php
[Please note this code shown here, is for the default theme Kuberick,which comes with wordpress,depending upon your theme and header you may need to use custom css here]
See the live demo here [Click on the articles on the demo site to see the use of unique header thing)
NOTE:It seems ,someone has deleted all the posts from the demo site,as i mistakenly provided the test user rights to edit/delete posts.well,I will be correcting my mistake tomorrow.For the time being,I encourage you to login and try uploading some image of your choice on the demo site and looking at it in action.
http://plugins.wpdemos.com/gt-unique-header-image/
Do you want to try it yourself,well use following credentials
http://plugins.wpdemos.com/gt-unique-header-image/wp-admin/
User: test
Password: test
Try,posting some new posts with any image of your choice and then click to view the page.
ok,so you need a download link now.Here goes the download link
http://downloads.wordpress.org/plugin/wp-unique-article-header-image.zip
Tags: Wordpress, wordpress plugins






















October 24th, 2008 at 3:25 AM
[...] Anforderungen erforderte nur kurze Recherche meinerseits - ein entsprechendes Plugin existiert: Wp Unique Article Header Image. Mit diesem Plugin kann man pro Post bzw. Seite ein Headerbild definieren. Nun muss man das Ganze [...]
October 24th, 2008 at 5:35 AM
Hi brajesh,i have been trying since a few day to get your script working. No chance what so ever.Your idea of a unique image for single article is brilliant (but only if I could get it to work)I am using wordpress 2.6.3 with default theme.I always get the following error Warning: mkdir() [function.mkdir]: No such file or directory in /blog/wp-content/plugins/wp-unique-article-header-image/GTUniqueHeader.class.php on line 34
Fatal error: Cannot access empty property in /blog/wp-content/plugins/wp-unique-article-header-image/GTUniqueHeader.class.php on line 39When I write an article wordpress does not shot a view of the default image or does upload a image.I have edited the header.php and changed the wp-config.phpMaybe i am using the wrong urls in admin -> GT Unique Header ImageThanks in advanceKind regards from Germany and keep up the good workMarc Jansen
October 24th, 2008 at 9:39 AM
Sorry my mistake I did not give the “upload” directory the necessary rights.Still working on it.I will post a comment, when i have got it workingthanks againmarc jansen
October 24th, 2008 at 10:52 AM
hi Marc,Thanks for stopping by.I am very glad to see your message here.Well,It is required that your uploads directory must be writable,otherwise Image can not be stored on the server.I just tried by posting a new message on the demo site and It worked.If you have any issue with implementing the plugin,direct me to the blog you are trying to implement it and I will assist you as soon as possible.I am sorry,I should have posted more details.Will be posting the more details about setting up the directory permission later.bye the way,I checked your post at demo site,It showed me default image,try uploading Image and publishing the post.It must work.
Thanks
Brajesh
October 24th, 2008 at 12:14 PM
Hi Brajesh, you are realy cool, thanks for the fast reply. Solved the problem, just had to rewrite some codes and voila “Its WORKING”. I will post you, what i have changed and some tips (how to avoid some problems) tomorrow. thanks a million. by the way your plugins is the best one for wordpress (giving it a unique style). your are definitely MASTER OF PHP CODE Thanks for your precious time. Marc Jansen
October 24th, 2008 at 4:05 PM
hi Marc
Thanks for your wonderful comments.I will look forward to your message tomorrow.I hope your helpful tips and ideas will add to the further improvement of the plugin.
Thanks Again
Brajesh
October 27th, 2008 at 4:03 AM
Hello, very nice plugin and it works great, really.My Q is that i want to use a swf instead of an image, how can i do that.Is there a way around this?…the site i´m working on is http://www.beackereihermann.de Thank you Alfredo canale swww.elmotin.com
October 27th, 2008 at 4:39 AM
hi Alfredo
Greetings! I checked your site and it seems down at this time[beackereihermann.de].Yes, you can insert swf file instead of images.You don’t need to modify the plugin.
Just you have to write the embed element like <embed src=<?php echo gt_get_image_url();?>”..more codes… />.Fore more information on embed check http://www.w3schools.com/tags/html5_embed.asp.
Here what we are doing basically,calling the same function which outputs image url to output swf url.
Hope it helps.If you have any other issue,please let me know.I will love to assist you.
Thanks
Brajesh
October 27th, 2008 at 5:10 AM
Hi…thanks…i will try this…other thing is what if i want to only use swf header in first page and the other pages in jpg…will it work if i pu the embed tag even if it is an image?..the right adress is……www.baeckereihermann.de
October 27th, 2008 at 5:48 AM
hi Alfredo
well,I am not sure ,give it a try or i will try and post her ,but the standard use of embed should not be to imbed images.
Better, you may try using conditional tags.check details here http://codex.wordpress.org/Conditional_Tags
using something like
<?php if(is_home()):?>
<embed ..code here —- />
<?php else: ?>
<img ..or standard use here —-/>
<?php endif;?>
it will solve your problem.
If you need any other assistance,please drop me a message here.
Regards
Brajesh
October 30th, 2008 at 4:52 PM
[...] WP Unique Article Header Image [...]
October 30th, 2008 at 6:36 PM
[...] WP Unique Article Header Image [...]
October 30th, 2008 at 7:30 PM
[...] WP Unique Article Header Image [...]
October 30th, 2008 at 9:05 PM
great one! thanks for do soemthing like that and sahre it…great work, congrats!!adeux
October 30th, 2008 at 9:46 PM
Hi, Brajesh.I’m having the same issue as the first person who commented, with the PHP errors about being unable to use the mkdir function. I read your response, about changing the permissions to the “uploads” folder, but I’m not sure which folder you mean. I don’t have any folder called “uploads” anywhere on my server. Forgive me if I missed something in your directions — Do I need to create this folder somewhere? If so, where?
October 31st, 2008 at 12:31 AM
I like the idea of this plugin very much for my blog. I installed the plug in but received the following error message while trying to activate:Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/pal0216/public_html/missingandmurderedchildren/wp-content/plugins/wp-unique-article-header-image/GTUniqueHeader.class.php on line 83I am using the current version of WP and The Journalist theme. I tried deactivating all plugins and then activating only yours but still received the same error message. Does the snippet of code still need to be inserted in the header.php file because you do not state that on the WP Plugin page.Thanks again for this great idea for a plugin
October 31st, 2008 at 1:13 AM
On all my sites (with different versions of WP - INCLUDING v 2.63) the plugin fails to load with fatal error message. Keep working on it! Good luck
October 31st, 2008 at 1:48 AM
Hi there,very nice plugin. thanks for sharing.so longJoachim
October 31st, 2008 at 2:04 AM
[...] Brajesh has a nice plugin developed that will help you to make unique image headers appear for each post, on Kubrick based WordPress themes. Easy to use plugin, but only for Kubrick lovers. Tutorial here. [...]
October 31st, 2008 at 4:52 AM
Amazing work!!! Thank you very much for your time and share of your knowledge with us. Just one question- do you plan to make similar script for use flash for instead of header image? This will be great step forward in development of WP as well Flash is not much supported as I know.Best regards and keep on good work!Srecko Bradic, Serbia
October 31st, 2008 at 7:10 AM
[...] WP Unique Article Header Image [...]
October 31st, 2008 at 7:15 AM
@allHi all,Thanks you for using the plugin and dropping by here.I am sorry I could not reply you earlier.Let me tell you something.The current version 1.0 requires PHP 5 .so,If you don’t have PHP 5 on your server you will get errors.I am planning to release an enhanced version 1.1 this weekend,which will be compatible with PHP 4 and PHP 5 both.continued in next message….
October 31st, 2008 at 7:20 AM
i can’t see d’screenshot??
October 31st, 2008 at 7:21 AM
hi Again
Some of the persons finding Issues with uploading after success full activation of the plugin should do the following
1.Please check the uploads directory exists inside your wp-content/ folder
2.Give the uploads directory a permission of at least 666(read write by owner group and others) .
If you have still any issue,Please post here,I promise to reply asap.
Thanks
Brajesh
October 31st, 2008 at 7:38 AM
@dlv
Thanks for dropping by
@Panda,Thanks for dropping by.Please check comment number 23,I have given a general explanation on what to do.
If you have still any issue,please leave a message here,I will get back to you as soon as possible.
@Trisha,It seems your server is using PHP 4,That’s why this error is occurring,please wait till this weekend,In next release I am adding PHP 4 support,Currently it only supports PHP5.
@Martin ,It seems you have same issue as Trisha,Please let me know,if you are using PHP5,currently it does not supports PHP4.
@Joachim,Thanks for dropping by.
@Srecko,Thanks for your message.well, you can use this for flash header too.Just you need to embed the flash in header as mentioned in my comment number 8 and 10
October 31st, 2008 at 7:45 AM
@aulia
hi,Thanks for dropping by.
For the screnshots of plugin in action,please visit the demo site given at the bottom of the post.
Try posting your own custom header and testing it.
Regards
Brajesh
October 31st, 2008 at 2:09 PM
<blockquote><span style=”font-style: italic;”>@</span>Trisha<cite>,It seems your server is using PHP 4,That’s why this error is occurring,please wait till this weekend,In next release I am adding PHP 4 support,Currently it only supports PHP5.</blockquote>I logged into the server and this is what it says about the PHP version they are running:PHP version5.2.6So, what else could be causing the error message if my server is in fact running PHP version 5?
October 31st, 2008 at 3:36 PM
[...] WP Unique Article Header Image [...]
October 31st, 2008 at 3:39 PM
[...] WP Unique Article Header Image [...]
October 31st, 2008 at 4:05 PM
[...] WP Unique Article Header Image [...]
October 31st, 2008 at 5:51 PM
Great plugin, got it working on wordpress 2.6.3 using magicblue theme. I did not encounter any problems.
I have a few suggestions for a future release that may be worth looking into:
1. The ability to change the upload location from wp-content/uploads/ to a user specified folder.
2. The ability to switch back to the default header image if the user decides not to use the one they just uploaded.
3. The ability to select a header image that is in the uploads folder as well as delete a header image.
Keep up the good work, I will definitely recommend this plugin to my friends.
October 31st, 2008 at 6:05 PM
@Trisha
Thanks for the info.
Well,I am little bit busy with a plugin for my client.I will get back to you with a definite solution this weekend.That’s my promise.
@Wisedog
Thanks for dropping by and your suggestions.
I completely agree with you on the improvements of plugin.I will definitely add your suggestions in the next release.
@all
Hi all,please let me have your thoughts and suggestions here,I will certainly incorporate them ,if they will help to enhance the functionality of the plugin.All your valuable suggestions are most welcome.
Thanks
Brajesh
October 31st, 2008 at 8:14 PM
HiWhen I try install the plugin I get the error:parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in/usr/shared/web/migu39/wp-content/plugins/wp-unique-article-header-image/GTUniqueHeader.class.php on line 83
October 31st, 2008 at 8:32 PM
In time. After get the error I put in wp-config.php the line <?php define(’WP_POST_REVISIONS’, false); ?> but get the same error….
October 31st, 2008 at 8:53 PM
Hi Miguel
Can you tell me your server configuration.I.e which version of PHP you are using.
As far as I can see,This is because your server is using PHP 4.At line 83,there is first public function (constructor) of GTUniqueHeader dfined.
PHP 4 does not recognizes public keyword,that’s why the error is coming.I will be posting an updated version of the plugin within next 2-3 days which will be compatible with php4.
Please wait a little.
Thanks
Brajesh
November 1st, 2008 at 1:58 AM
Okay, I finally got it to accept the header image I wanted. However, I didn’t realize that I’d have to add something to the PHP code for the header. Since I know absolutely nothing about PHP I don’t think I’m going to be able to figure this out. I have a friend who, I hope, can help me get it figured out in a few weeks. In the meantime, I’ll have to go with it as-is.Maybe you can answer one question for me: Why is it that you recommend disabling the revision history for the posts? If I don’t do that, will I encounter errors, or does it just not properly save the history for the uploaded images? I rather like the history feature and I’d prefer not to disable it if I don’t have to.
November 1st, 2008 at 2:53 AM
brajesh,I understand now - realy is php 4. Thanks for your reply and I will wait for the update!!!Regards
November 1st, 2008 at 8:46 AM
[...] WP Unique Article Header Image [...]
November 1st, 2008 at 3:02 PM
[...] n Wp Unique Article Header Image Plugin for Wordpress | Geeky Talks |All about wordpress and programmi… [...]
November 1st, 2008 at 3:38 PM
[...] WP Unique Article Header Image [...]
November 4th, 2008 at 5:25 AM
[...] WordPress sites to give you coding tips and tricks seem to be the latest rage, and new plugins are coming so fast and many you’d think everyone’s been stockpiling their code over the summer. [...]
November 6th, 2008 at 6:07 AM
Really like how this Plugin works, but i have a site running PHP4 i would like to use it on . Noticed you were going to do a version for this. How did you get on with the PHP 4 one?
November 8th, 2008 at 7:27 AM
[...] « Wp Unique Article Header Image Plugin for Wordpress [...]
November 27th, 2008 at 5:16 AM
hi there, could you tell me where the this image file store because i want to update also. if i upload wrong image first time so it can’t be edit second time. could you tell me where this value store. means which database table or file… Thank You Ence
November 30th, 2008 at 7:29 PM
Well…I waited 30 days for the update to PHP 4.x…Where is brajesh ? The project to PH4 is abandoned?
December 5th, 2008 at 5:31 PM
[...] are the updates and future plans about the two of my released plugins.Thank you very much miguel for your patience.I have not abandoned the plan for wp-Unique-article-header-image to port to [...]
December 6th, 2008 at 2:48 AM
@Panda
Hi,I was not visiting my blogs frequently ,so could not reply you earlier.
If you want I can assist you in using it on your blog.The second thing, you may not turn off the auto save feature,But it is recommended because sometimes issues may arrive.But you won’t loose any data if you have enabled the auto save.
December 6th, 2008 at 2:50 AM
@Miguel
Hi,sorry I could not update it earlier but in the next release scheduled around 20-21st dec,I am going to add many more features including the PHP4 compatibility.Thanks for your patience.
December 6th, 2008 at 1:32 PM
Arighty then. As for adding it to the blog somewhere, I assume you have to throw something in to the PHP for it, right? I’m lookin’ at what you said in the post about how it’s done and it sort of makes sense to me, but I wouldn’t want to blow anything up so I’m not going to touch it for the moment.
December 9th, 2008 at 12:02 PM
I really like the concept of this plugin. Originally I tried using it with PHP 4 which didn’t work. I have now upgraded to PHP5 and was able to activate the plugin. When I add an image for the header of a page it doesn’t put the image in the header. Any idea of what I am doing wrong?
December 16th, 2008 at 4:41 PM
hi Mel
Sorry ,I forgot to mention here,but I mentioned in the readme.txt,since you are using wordpress 2.5+,so you will need to turn off the post revision,for that you may use one of the available plugins or just edit wp-config.php and add following lines
<?php define(’WP_POST_REVISIONS’, false); ?>
That’s all you are done
and It will work perfectly.
Thanks
Brajesh
December 19th, 2008 at 3:46 AM
Hello,I installed your plugin and I have it working in Firefox (very nicely, thank you), using the following code in the header.php file of the Minimalism theme (based on kubrick):<code><style><?php if(is_single()||is_page()):?>#header{background:url(<?php echo gt_get_image_url();?>)no-repeat bottom center;}<?php endif;?></style></code>But it does not work in Internet Explorer 7. This is what I see in the source code of the page generated by IE7:<code><style></style></code>Nothing between the style tags whereas in Firefox the page source looks right.In IE7 it uses the default header image. What do I need to do to make sure the unique header image shows up in IE?Thanks,Chrys
December 22nd, 2008 at 5:45 AM
Hello,This is a great plugin I appreciate it.
I have installed it and updated that line you told me to on the wp-config.php, afterwards when you said“2.Go to Options->”GT Unique header Image”"I didn’t manage to find what you mean.
I have edited a page of mine which I want to have a different header.
after i edit it I get the message
Warning: Cannot modify header information - headers already sent by (output started at /home2/getattra/public_html/goglobal/wp-config.php:35) in /home2/getattra/public_html/goglobal/wp-includes/pluggable.php on line 770
When I come back to it though I see the the thumbmail of the image I want in my header but the page still has the default header.
Can it be fixed?
Regards,
Jean
December 25th, 2008 at 6:08 PM
I have a problem with this plugin,when I upload a picture in my wordpress dashboard it goes white.
so i am just wondering if it works with wordpress 2.7
also where should i put <?php $image_url=get_get_image_url();?> ?
thanks,
January 6th, 2009 at 12:06 PM
hi Chrys
Sorry,because of holidays ,I could not reply.
The issue you mentioned is not a problem with the plugin.This is something a css issue.Try to write style block as
May be IE 7 is not understanding the style block without the type=”text/css”,so try that,may be it should solve your problem.
January 6th, 2009 at 12:10 PM
hi Jean
are you using wordpress 2.7,In that case you need to go to settings(as wordpress has changed the names of different sections)->GT Unique header Image
The error you are getting is because of some space issue.
Please check your theme’s header.php or wp-config.php or theme’s functions.php has no spaces before the PHP tag,if there is any space ,remove that and save.It will work.
January 6th, 2009 at 12:15 PM
hi Milad
Please check two things
1.are you able to upload images using your wordpress Image uploader and are they showing correctly,If not you need to change some lines in htaccess ,as some security settings does not allow uploading files.
2.If you are able to upload the file using your wordpress Image uploader,then please check ,have you set the correct permission for uploads directory.Does it allows writing file.If yes,there there should not be issue,If no,please change the permission to make 777.