- This topic has 2 replies, 2 voices, and was last updated 9 years ago by Sakin.
-
AuthorPosts
-
April 11, 2015 at 8:21 am #55539aezzellMember
Can someone please explain how the “randomize uploaded header” feature is supposed to work?
I have header images enabled on all the site pages, and my expectation is that randomizing them would select a random image each time a page loads.
That’s not happening.
Here’s the site: http://www.uppervalleyfencingclub.com/wp/
I have 4 possible header images uploaded, and they are listed in the Previously uploaded section. But the same image keeps displaying, and it’s the same on all pages.
What’s random about this feature? What am I missing?
Thanks.
April 11, 2015 at 8:41 am #55542aezzellMemberI can’t see how to edit my original post, so let me add this:
I found out how to assign a different featured image on each page and use that in place of the header image, but that means manually setting the default image on each page.
Not a big deal in the grander scheme of things, but I’d like to understand how to use the randomize header image feature.
Thanks!
April 11, 2015 at 9:40 am #55546SakinKeymaster@aezzell: This theme doesn’t use random header so instead we added in Different header image option. You can build child theme and add the following code in your child theme functions.php file. For child theme, check out http://catchthemes.com/blog/create-child-theme-wordpress/
function catchresponsive_featured_overall_image() { $options = catchresponsive_get_theme_options(); $header_image = get_header_image(); if ( $header_image != '' ) { ?> <div id="header-featured-image"> <div class="wrapper"> <?php // Header Image Title/Alt if ( !empty( $options[ 'featured_header_image_alt' ] ) ) { $title = esc_attr( $options[ 'featured_header_image_alt' ] ); } else { $title = ''; } // Header Image Link and Target if ( !empty( $options[ 'featured_header_image_url' ] ) ) { $link = esc_url( $options[ 'featured_header_image_url' ] ); //Checking Link Target if ( !empty( $options[ 'featured_header_image_base' ] ) ) { $target = '_blank'; } else { $target = '_self'; } } else { $link = ''; $target = ''; } if ( !empty( $options[ 'featured_header_image_url' ] ) ) { ?> <a title="<?php echo esc_attr( $title ); ?>" href="<?php echo esc_url( $link ); ?>" target="<?php echo $target; ?>"><img src="<?php header_image(); ?>" alt="<?php echo $title; ?>"></a> <?php } else { ?> <img src="<?php header_image(); ?>" alt="<?php echo $title; ?>"> <?php } ?> </div> </div> <?php } }
-
AuthorPosts
- The topic ‘Randomizing header images’ is closed to new replies.