• I am using the theme Twenty Eleven. I have uploaded a number of images to use as my headers. I am now wanting to change those images to some updated ones. When I tried to do that, it seems that I can only add new ones, but the old ones stay there. So, when I use the “random” feature, it randomizes the new images as well as the old ones. Does anyone know how to delete the old ones so they are not included in my random header selection?

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is the code I use in a twenty eleven child themes functions.php.

    add_action( 'after_setup_theme', 'childtheme_setup' );
    
    if ( ! function_exists( 'childtheme_setup' ) ):
    function childtheme_setup() {	
    
    	/* 1140 Remove Headers */
    	function dr_remove_twenty_eleven_headers(){
    		unregister_default_headers( array(
    			'wheel',
    			'shore',
    			'trolley',
    			'pine-cone',
    			'chessboard',
    			'lanterns',
    			'willow' ,
    			'hanoi')
    			);
    	}
    	add_action( 'after_setup_theme', 'dr_remove_twenty_eleven_headers', 11 );
    }
    endif;

    If this resolves the problem then please mark this topic as resolved!

    HTH

    David

    how to delete the old ones so they are not included in my random header selection?

    delete the images from
    dashboard – media – library

    Hi alchymyth,
    I an not sure but I thought the OP might mean the default headers when reffering to ‘old ones’, these load from the twenty eleven folder and not the media library, so cannot be deleted.

    So when the random images run do these include the default headers as well as the uploded ones, if so should really be an option to exclude default images.

    Either way they have two answers to work with.

    I could be wrong though, they might only mean their own uploaded images, which if removed from the header section should stop showing as random, or is the inclusion of removed header images an un-documented feature (bug):

    I am now wanting to change those images to some updated ones

    Regards

    David

    Thread Starter markmichal

    (@markmichal)

    Alchymyth, you hit the nail on the head. That’s exactly what I needed to do. Thank you. Digital Raindrops, thanks for your input too. There’s no bug. I was using pictures that I had previously loaded. I also had the option of using the stock photos that came with the theme but I chose not to. Thanks guys!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Theme: Twenty Eleven} Delete custom header images’ is closed to new replies.