Random Header Image

Community Forums Forums Design Tips and Tricks Random Header Image

This topic is: not resolved

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  braddalton 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #47280

    itsonlybarney
    Participant
    Post count: 15

    I’m thinking of starting a new blog, and would like the theme to have a random image from a pool of images appear as part of the header. Can that be achieved with CSS only? Or would I need some form of Javascript or PHP to do the heavy lifting?

    #47302

    braddalton
    Participant
    Post count: 7458

    It’s already built into WordPress so it can also use it in your child theme if it includes support for a custom header. If not, you can also add support for a custom header image.

    Example:

    /** Add support for custom header */
    add_theme_support( 'genesis-custom-header', array(
    	'width' 	=> 1140,
    	'height' 	=> 100
    ) );
    

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.