Cutline Theme Support Forums » Cutline Theme Support Forums

Random Header Images Not Working

(12 posts)
  • Started 4 years ago by APerson
  • Latest reply from APerson
  • This topic is not resolved

  1. APerson
    Member

    Okay, I'm a complete loss. I'm in the process of switching my blogs from MovableType to WordPress and really like the Cutline Theme. I am; however, having a very difficult time getting the random header images to work on the second blog that I'm converting.

    Both the first blog and the second one are housed on the same site and, except for the directory in which they're located, everything else is exactly the same. The strange thing is that, no matter what I do, the random images on the second blog don't change the vast majority of the time (they seem to change every now and then but there doesn't to be any pattern as to why they don't all of the time). I've also checked both using IE and Firefox and that doesn't seem to make a difference either.

    The blog that works is located at: http://bassoonman.com/blog/
    The blog that doesn't work is: http://bassoonman.com/kites/

    Again, I've tried everything I can think of but nothing seems to help.

    Posted 4 years ago #
  2. The second one http://bassoonman.com/kites/ that appears to be frozen on one image - has something in the file that requires Adobe Flash to be installed. When I first viewed the site image 3 was showing - I closed the window and left the site - when I returned it was stuck on image 5.
    The first one http://bassoonman.com/blog/ did not ask me to install anything and the images rotate nicely.
    So perhaps what ever is requiring Flash is clogging the random images?
    Perhaps that will help you fix things? Hope so!

    Posted 4 years ago #
  3. APerson
    Member

    Hi junedodge,

    There should be anything that requires flash (except, perhaps, for the videos on the page). For the life of me, I can't seem to figure out what's causing the image to freeze - for testing purposes, I'm even using the same images for both.

    Posted 4 years ago #
  4. APerson
    Member

    Hello again,

    I just tried eliminating the videos from that page and that didn't solve the problem - good idea to try, though. Any other ideas? This seems to be a very strange problem.

    Posted 4 years ago #
  5. APerson
    Member

    Something is definitely wrong - while I haven't done anything to the blog that did work, the header images now fail to rotate on both blogs. Any ideas? Is anyone else having the same problem?

    Posted 4 years ago #
  6. It's all working fine for me.

    You know, they don't refresh every time a page loads. Each image is actually programed to associate itself with a different type of page template. Either a Page a Post, Home, Archive, etc.

    Posted 4 years ago #
  7. It looks like you have switched off the random images and instead have the default image stuff - that is associated with a page type as thirdeyetc has noted.

    -----
    Look in your header.php file - toward the end. Are you seeing this --->
    <div id="header_img">
    <img src="<?php bloginfo('template_url'); ?>/images/header_<?php echo(rand(1,26)); ?>.jpg" width="770" height="140" alt="<?php bloginfo('name'); ?> random header image" title="<?php bloginfo('name'); ?> random header image" />
    </div>

    -----
    Or are you seeing something that ends with this at the end --->
    <?php } else { ?>
    <img src="<?php bloginfo('template_url'); ?>images/header_5.jpg" width="770" height="140" alt="<?php bloginfo('name'); ?> header image 5" title="<?php bloginfo('name'); ?> header image 5" />
    <?php } ?>
    </div>

    -----
    If it's the second thing (which I think it is now) then you need to <!-- comment --> all the original stuff about the div id for header img and instead have the first stuff about random images so it is working. By commenting out you can restore if needed.

    : )

    Posted 4 years ago #
  8. APerson
    Member

    Hi jundodge,

    I just checked and my headers are the same as your first (correct) example. The only difference is that I've the default of five images (your's says 26).

    Thirdeyetc,

    Sorry, but my headers very seldom change, if at all. I've tested from several computers (work and at home). Previously, the one blog would change almost every time, now it doesn't (and I didn't change anything - not even adding a post). Thanks for your suggestions though.

    Posted 4 years ago #
  9. The first one works, second one doesn't as you stated.

    Will you paste the following from your header.php file?

    <div id="header_img">
    <?php if (is_home()) { ?>
    <img src="<?php bloginfo('template_url'); ?>/images/header_1.jpg" width="970" height="140" alt="<?php bloginfo('name'); ?> header image 1" title="<?php bloginfo('name'); ?> header image 1" />
    <?php } elseif (is_single()) { ?>
    <img src="<?php bloginfo('template_url'); ?>/images/header_2.jpg" width="970" height="140" alt="<?php bloginfo('name'); ?> header image 2" title="<?php bloginfo('name'); ?> header image 2" />
    <?php } elseif (is_page()) { ?>
    <img src="<?php bloginfo('template_url'); ?>/images/header_3.jpg" width="970" height="140" alt="<?php bloginfo('name'); ?> header image 3" title="<?php bloginfo('name'); ?> header image 3" />
    <?php } elseif (is_archive()) { ?>
    <img src="<?php bloginfo('template_url'); ?>/images/header_4.jpg" width="970" height="140" alt="<?php bloginfo('name'); ?> header image 4" title="<?php bloginfo('name'); ?> header image 4" />
    <?php } else { ?>
    
    		<img src="<?php bloginfo('template_url'); ?>/images/header_5.jpg" width="970" height="140" alt="<?php bloginfo('name'); ?> header image 5" title="<?php bloginfo('name'); ?> header image 5" />
    		<?php } ?>
    	</div>
    Posted 4 years ago #
  10. APerson
    Member

    Hi thirdeyetc. I pasted the code and, as before, the header doesn't change. Any other ideas? Thanks.

    Posted 4 years ago #
  11. APerson
    Member

    I still can't get the images to rotate randomly. Is anyone else having this problem?

    Posted 4 years ago #
  12. APerson
    Member

    It works!

    After nearly giving up, I thought I would try one last time in order to get the random images to work. While I’m not sure what’s changed, I suspect that I may have found the problem. I suspect that the problem was caused by the order in which the installation process occurs. I had been moving my blogs over to WordPress from MovableType and I believe that after I first installed WordPress, I imported my files right after I installed WordPress. I then installed Cutline 1.1 after which I would then install the random image version of the header.php file. For some unknown reason, it appears as if doing so prevents the header images from rotating randomly. I had tried just about everything I could think of and nothing worked.

    In desperation, I tried creating a blog on a different URL (but on the same server) today and magically, the random header images started to work. I then tried creating on new blog on the same URL as my existing one but did not important the blog’s database until after I had installed WordPress from scratch, installed Cutline 1.1, and finally installed the random image header.php file. Suddenly, the headers now change and everything seems to work properly. I hope that this will help others who may have the same problem.

    Posted 4 years ago #

RSS feed for this topic

Reply

You must log in to post.