Cutline Theme Support Forums » Cutline Theme Support Forums

fixing header images

(7 posts)
  • Started 4 years ago by Raquita
  • Latest reply from hracky
  • This topic is not resolved

Tags:


  1. Raquita
    Member

    I am trying ot add additonal images to my header but when I do the whole thing goes white, any help on adding images past 5?

    Posted 4 years ago #
  2. I have not tested this on my own blog (since I am not rotating different pics) but give this a try.

    First upload the additional pics you want into your images folder and name the files in the sequence already in place for Cutline. (Example: header_6.jpg, header_7.jpg, etc.)

    Next, in your header.php you will find the code for each individual picture to be called upon:

    This is an example of the code that calls upon the first pic:

    <img src="<?php bloginfo('template_url'); ?>/images/header_1.jpg" width="323" height="140" alt="<?php bloginfo('name'); ?> header image 1" title="<?php bloginfo('name'); ?> your site name here" />

    You will see this code for each of the 5 pics currently in the cutline images folder.

    After header_5.jpg code in the header.php (and before the </div>), copy and paste the above code but modify it with the next picture you want in the sequence.

    Example:

    <img src="<?php bloginfo('template_url'); ?>/images/header_6.jpg" width="323" height="140" alt="<?php bloginfo('name'); ?> header image 6" title="<?php bloginfo('name'); ?> your site name here" />

    This ads the new pic file you uploaded, header_6.jpg, to be called upon in your header.php.

    Now, you can keep tacking on additional code just by copy and pasting the same thing but changing the file name to the picture you have uploaded to your images folder.

    Hope that works!

    Posted 4 years ago #
  3. Oh! FYI. The dimensions I have in the example code are most likely not the same as what you are using. That is straight off of my header.php as I modified how my header is viewed.

    So, that will need to be adjusted to the dimensions already shown in your header.php

    http://www.patriotmissive.com

    Posted 4 years ago #
  4. Raquita
    Member

    that didn't quite work - it now shows all the new header images all at once instead of cycling them

    Posted 4 years ago #
  5. Raquita
    Member

    I think its missing php information but I don'tknow what exactly it is missing

    Posted 4 years ago #
  6. <div id="header_img">
    <?php if (is_page('archives')) { ?>
    <img src="<?php bloginfo('template_url'); ?>/images/header_archives.jpg" width="770" height="140" alt="<?php bloginfo('name'); ?> archives page header image" title="<?php bloginfo('name'); ?> archives page header image" />
    <?php } elseif (is_page('about')) { ?>
    <img src="<?php bloginfo('template_url'); ?>/images/header_about.jpg" width="770" height="140" alt="<?php bloginfo('name'); ?> about page header image" title="<?php bloginfo('name'); ?> about page header image" />
    <?php } else { ?>
    <img src="<?php bloginfo('template_url'); ?>/images/header_<?php echo(rand(1,5)); ?>.jpg" width="770" height="140" alt="<?php bloginfo('name'); ?> random header image" title="<?php bloginfo('name'); ?> random header image" />
    <?php } ?>
    </div>

    In the last call "echo(rand(1,5)); rotates images 1 through 5 if you have more images than 5 you need to increase the 5 to whatever number of images you have.

    You can go to this page and get a new header.php already made to rotate images for cutline 2 column theme... http://cutline.tubetorial.com/totally-random-header-images-for-cutline/

    Posted 4 years ago #
  7. I tryed add images to header few times and always it is looking bad..

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.