Remove an uploaded header image

Well uploading image and using it as header image are two different things. WordPress uploads image using media uploader and all images are stored in media library. Header image setting page just maps that which images should be used as header image. So to remove header image , you just have to remove its mapping. … Read more

Different Header Files WordPress

Use get_header($name) where $name corresponds to a file in your theme with the following convention: header-{name}.php So the following calls correspond to theme files in this manner: get_header(‘style1’) //header-style1.php get_header(‘style2’) //header-style2.php get_header(‘style3’) //header-style3.php Example: <?php if($options[‘header_style’]) { if(is_page(‘header2’)) { get_header( ‘style2’ ); } elseif(is_page(‘header3’)) { get_header( ‘style3’ ); } else { //dynamically generating the name … Read more

How to use a svg as custom header?

I solved it using the second way. I found out that you have to register the default image also. So after registering the svg as a default header it displays like it should! Here is my code: register_default_headers( array( ‘kami-logo’ => array( ‘url’ => get_stylesheet_directory_uri() . ‘/images/logo.svg’, ‘thumbnail_url’ => get_stylesheet_directory_uri() . ‘/images/logo.svg’, ‘description’ => __( … Read more