Support » Plugin: Add Custom Header Images » Great, except default 2011 header images show up.

  • I am using Add Custom Header Images with the WordPress Twenty Eleven theme. It works great except that there seems to be a bug. The Twenty Eleven theme comes with a number of default header images that show up along with the images I had uploaded to the “The Headers” page for the plugin to use.

    I did a hack to fix this using a tip from Voodoo Press: http://voodoopress.com/adding-and-removing-default-headers-in-twentyeleven/

    // REMOVE SOME DEFAULT HEADERS
    function voodoo_header_out() {
        unregister_default_headers( array(
            'wheel',
            'shore',
            'trolley')
        );
    }
    add_action( 'after_setup_theme', 'voodoo_header_out', 11 );

    If you do this, be aware that the array of default images in the example is incomplete. You will have to add the rest of them.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andy Fragen

    (@afragen)

    You should just reinstall the TwentyEleven theme.

    The plugin takes care of unregistering the default images.

    Plugin Author Andy Fragen

    (@afragen)

    Hey Jake,

    I didn’t realize what you were saying in your first review. Sorry and thanks! It seems that in my code the global $_wp_default_headers wasn’t set when the plugin was inited.

    I was able to change the priority and now it should unregister the default headers correctly.

    Thanks again.

    Dear Andy, I probably didn’t describe the problem well enough. Anyway, it was a valuable learning experience for me. Thanks for fixing the bug. I have updated the plugin and removed my funtions hack and it works PERFECTLY! I would change my rating to five stars, but the original post is no longer editable.

    Plugin Author Andy Fragen

    (@afragen)

    Thanks Jake. I always thought the rating was changeable. You might just try clicking on the 5th star.

    Glad everything’s working as it should be for you. Don’t worry if you can’t change the rating @ipstenu says 4 stars are more valuable than 5 anyway. 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Great, except default 2011 header images show up.’ is closed to new replies.