PrimePress Theme for WordPress Rotating Header Image

Customizing Rotating Header Images

"...Worth a Thousand Words"
another boring cliche that has lost its intended meaning? hell no! It has been over-used alright... (and I wouldn't dare say that out loud) but its true to its every word.

A few well chosen images - can add tons of visual appeal to your site, can convey more information, can make a good site a great one. so gather up all the pictures you like, putting them up in PrimePress is easy.

note: If you are already using PrimePress, please update your theme to version 1.2. It has a better image rotation solution. These instructions apply to v1.2 and on.

How-to?

I'm assuming you have your images cropped and ready. If not, crop them to a wide aspect ratio. The ideal and default width here is 920px and any bigger or smaller images will be scaled to this width. The height is calculated to a value that doesn't mess up the aspect ratio.

  1. upload them to the /headers folder inside the primepress directory
  2. hehe... that's it. Its done, you don't have to rename them or edit any of the theme files.

Every image in this folder will automatically be read and randomly rotated. For the record, you can upload any number of images - just let me know if you wanna put up more than a 100.

Don't want them rotating?

May be you've got a single header image ready and would like to show only that one. That's easy, just upload that one image to the /headers folder inside the theme directory and delete any other files in that folder.

26 Comments

  1. IndiaAsks says:

    Oh nice. You have made the script read the number of images and then randomize. Less work for me :D

    Congrats and Keep up the good work.

  2. Julie says:

    I loaded my three photos, but only two rotate thru??? Am I doing something wrong? Also, how do I change the background color on the sidebars? I also changed the color for my header (Fort Mill Yoga) but I don’t know how to change it to a darker green to match the header pictures. Sorry for all of the questions- I am new to wordpress and I am a little rusty at coding ;)

    One last question. . . how do I change the “Blogroll” to “Yoga Links”.

  3. Ravi Varma says:

    @IndiaAsks
    Thanks a lot man

    @Julie
    Hi Julie,
    all three images are being rotated. however, you have 2 different files of the same photo.

    you have to rename the Blogroll in your WordPress admin. Goto Manage > Link Categories and rename it to “Yoga Links” and click Edit Category.

    If it is the site title u want to change the color of, then add this code to your custom.css and change it to a color of your choice.

    body.custom .homelink a {
    	color: #006633;}

    changing the sidebar color would make the design a bit inconsistent. instead, I suggest you change the widget color like this

    body.custom .widget {
    	background: #E0EFD1;}

    or better yet, forget the above code and change the background color to a dark green for a much better overall design.

  4. Bradley says:

    Hello:
    I’m using your template in a ‘multiblog’ set-up, the problem I had was I didn’t want all the banners to show up on all the blogs– so I modified the header-image.php file as such…

    <img src="<?php bloginfo('template_url'); ?>/headers/<?php bloginfo('name'); ?>.jpg"
    width="920" alt="<?php bloginfo('name'); ?> Rotating Header Image" title="<?php bloginfo('name'); ?> Random Header Image" />

    Basically this calls for an image that has the same name as the blog (+.jpg). It works great, but I would love to still be able to have random images that are specific to a blog– ie “blogname#.jpg”, so “myblog” would only randomly pick images “myblog1.jpg”, “myblog3.jpg”, etc.

    Is this possible? Thanks!

  5. Ali says:

    Hello,

    I downloaded primepress yesterday. I just have one question - how come my blogroll doesn’t show up? I have added a couple of links, but there is not a blogroll at all on my site..

    Thanks!

  6. Ali says:

    Hi again,

    Under presentation - widgets, I tried dragging and dropping links into the sidebar, but nothing ever changes…

    Thanks again

  7. Ravi Varma says:

    @Bradley
    Hi Bradley. From what I understand, this code should work.

    <img src="<?php bloginfo('template_url'); ?>/headers/<?php bloginfo('name'); ?><?php echo(mt_rand(1,4)); ?>.jpg"
    width="920" alt="<?php bloginfo('name'); ?> Rotating Header Image" title="<?php bloginfo('name'); ?> Random Header Image" />

    This code will randomly pick from these images on “myblog” - “myblog1.jpg”, “myblog2.jpg”, “myblogn3.jpg”, “myblog4.jpg”

    change no. 4 in the code to an appropriate number according to your filenames.

    @Ali
    Thanks Ali for your interest in the theme.
    This is definitely something you’d have to do in your WordPress admin. Make sure you save changes after you change any widgets. Which version of WordPress are you running? A link would be helpful.

  8. Richardson says:

    Hi there,
    I’m wondering if there is any possible way to assign a specific caption for each of the rotating banner images? An example would be like the Cornell University web page. A certain text would be assigned to each image.

  9. Ravi Varma says:

    Hi Richardson,
    I’m afraid it cannot be done with the way the random images are setup in this theme.

  10. Hi Ravi,
    I’m playing with your PrimePress theme, on a local copy of WP.
    How do I get rid of the default “Search” box and input?
    I’ve been thru the files, commented out everything I’ve found for the Search box, but it still shows up. I use Lijit for my search, and would like to not use the default Search box.
    Many thanks in advance! And you really should set up a Donate button for us to “thank” you for such a nice, clean theme!

  11. Brian Meagher says:

    Oops! Skip the above question… I found the answer to turn off the Search box here:
    http://www.techtrot.com/primepress/theme-customization-changing-background-color-border/#comment-113

    I also turned off the Feed box, as I use the Feedburner Plugin.

    Finally, sorry to be off topic. I don’t think my question/answer belong here in the Customize Rotating Header Image post. Doh!

  12. Jonas says:

    Hi Ravi!

    I have big problems with the rotating header images, you can look at my site http://jomari.se

    Thanks! :)

  13. Ravi Varma says:

    @Brian
    Thank you Brian. glad you’ve sorted it out.

    @Jonas
    I see you’ve solved the problem. No problem..

  14. Great theme… I like it a lot.

    Question… can the rotating banner graphics be hyperlinked individually to a unique URL for each banner graphic?

    I’m using the blog to generate traffic to several sites. The banner graphic acts as an ad rotator.

    Keep up the great work.

    Enrique

  15. Carl Chapman says:

    Ravi,

    I love your theme. Brilliantly executed. Does EVERYTHING right. Very readable. I will be using it on HUNDREDS of blogs very soon.

    I am installing a number of WordPressMU installs using domain mapping and MultiSite manager plugin. Your theme is one of the most popular, but the random rotating images are a bit of a problem. I would like them to be unique for each blog.

    Seems to me that a wonderful enhancement to the them would be to add a header-image.php file that was database maintained, that showed up in the ‘design’ tab as several text input boxes (perhaps with a browse) where one could input the name of the image file that would be used for that particular install. Maybe a radio button to choose if you wanted multiple rotating images. Then with them stored in the database, they would be unique for each install on the WPMU site.

    If you could do that it would be FANTASTIC. On the other hand, your ‘hack’ works for the time being, just not so elegant as the theme. :-)

  16. Ravi Varma says:

    @Enrique
    Thanks Enrique. But I’m afraid what you want cannot be done with the current setup, at least not right now. I’ll surely look into this in the future.

    @Carl Chapman
    Thanks a lot Carl.
    hmm.. sounds good, more flexibility and super smooth customization. I should definitely look into, spend some time on this.
    Thanks again for the suggestion.

  17. Adam says:

    Hey,

    Thanks for a wonderful theme, so wonderful in fact that I’ve chosen it for my blog. I just have a question.

    Is it possible to associate a particular image with a static page but keep the rotating one on the home page? I have several pages for each country I cover - and would like for an image from that country to appear when they click on its tab at the top - it’s not so good to have a pic of Croatia when they click on Albania etc…

    Any help would be really, really appreciated.

    Thanks for a great theme!

  18. Ravi Varma says:

    Thank you Adam,
    It was too big a question to be answered in the comments. So, here you go.

  19. Eric S says:

    Hi Ravi,

    Awesome template, I like the customizations.

    I have multiple header images that I would like to have rotated automatically (sans refresh). Something along the lines of the “Slideshow” widget on my site.

    Any ideas?

    Thanks!

  20. Ulfa Maryon says:

    I have recently use primepress theme for my blog. What a wonderful theme it is. I wanna ask you about rotating header images. I have upload 16 images to /headers directory and I wanna set them rotating by sequence, not random. How to set it? Which part of rotating.php that i have to change?

    Thanks in advance.

  21. Ravi Varma says:

    @Eric S
    Thanks Eric and good job with the slideshow type headers.

    @Ulfa Maryon
    Thanks Ulfa,
    but sadly I’m not aware of a simple mod to achieve this right now. Perhaps you can take a look at the JW Image rotator or NextGEN Gallery and implement it into rotating-images.php.

  22. wow, great theme! thank you!

  23. Hi Ravi,
    Just a quick note to say I’m using Primepress1.3 and really like it. I’m new to this and just got my blog going so I haven’t attempted to do any customizing yet(that will come in time:-) but what a great support system you have here for it.
    Anyway keep up the good work Ravi, and you know I’ll be watching for any other themes ect. you put out!

  24. Chris says:

    Hi Great work on the theme! By far the best theme out there and I have been using it for some time. The problem just happened within the last couple of days. My rotating header images dissapeared and now are just showing the test “Frequency Solutions Rotating Header Image”. Any ideas on what may have happened? Feel free to look at my site. Any help would be greatly appreciated.

  25. Hi Ravi,

    Excellent theme. I searched but didn’t find my answer - so here it goes:

    Right now when you hover over the header image - it shows the alt text of the blog name and then “Random Header Image”. Is there a fix or set of code that I can use (or you can integrate) that would take the name I give the file - convert dashes to spaces and make that the alt text and title text of the image? It is a nice SEO technique too.

    Thanks again for the theme?
    Tom

  26. TobyWollin says:

    Ravi - I just downloaded primepress for my blog and I have the exact same problem as Boiling Springs and Chris - I deleted the rotating image.php files that came with Primepress in the header file and replaced it with another .php image and now all I have is ‘kitchencountereconomics kitchencounter economics’. Did I also need to change something in the theme editor?

Leave a Reply

  • Donate to PrimePress

    If you are happy with the theme and would like to make a donation, please use the button below. Thank you for supporting the development of PrimePress.

  • Recommended Host

    If you are looking for a good web-host, Dreamhost is among the best out there. Apart from the great stuff they offer, Dreamhost's got a hassle-free hosting environemnt ideal for WordPress. Type in PRIMEPRESS as the promo code to save US$50 while signing-up.