Title: [Plugin: Unique Headers] WordPress Custom Headers
Last modified: August 20, 2016

---

# [Plugin: Unique Headers] WordPress Custom Headers

 *  Resolved [Tim Griffin](https://wordpress.org/support/users/tgriff/)
 * (@tgriff)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/)
 * It should be noted that in order to use this plugin the custom headers option
   must be enabled.
 * How to enable this?
    See: [http://codex.wordpress.org/Custom_Headers](http://codex.wordpress.org/Custom_Headers)
 * For example, I am using a child theme built on Canvas by WooThemes.
    To enable
   use of this plugin here’s what was needed:
 * 1. Add the following to your functions.php (you can adjust the height and width
   depending on your theme)
 *     ```
       // Add support for flexible headers
        $header_args = array(
        'flex-height' => true,
        'height' => 183,
        'flex-width' => true,
        'width' => 680,
        'default-image' => get_template_directory_uri() . '/images/header.jpg',
       // 'admin-head-callback' => 'mytheme_admin_header_style',
        );
   
        add_theme_support( 'custom-header', $header_args );
       ```
   
 * 2. Now setup the default background under the Appearance / Header menu item
 * 3. Add the image call to your header.php file:
    `<img src="<?php header_image();?
   >" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()-
   >width; ?>" alt="image description" class="custom_header" />`
 * In my case it was better to insert the image call using the WooThemes hook and
   the code was added to our functions.php file like this:
 *     ```
       add_action( 'woo_header_inside', 'woo_custom_header_image' );
   
       function woo_custom_header_image () {
       ?>
   
       <img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="image description" class="custom_header" />
   
       <?php
   
       } // End woo_custom_header_image()
       ```
   
 * And finally add a bit of styling in the style.css file of your site to control
   how the image aligns itself. In my case, the image needed to float to the right
   of the logo image.
 *     ```
       #header img.custom_header{
       	float: right;
       }
       ```
   

Viewing 15 replies - 16 through 30 (of 32 total)

[←](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/?output_format=md)
[1](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/?output_format=md)
2 [3](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/3/?output_format=md)

 *  Plugin Author [Ryan Hellyer](https://wordpress.org/support/users/ryanhellyer/)
 * (@ryanhellyer)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956292)
 * I’d rather avoid any settings if possible. It could be done via the wp-config.
   php file, but I’m thinking that might be best implemented as an extra setting
   on the media page. I definitely wouldn’t want to make a whole settings page for
   the plugin since there would only be one setting on it.
 *  [ingvijonasson](https://wordpress.org/support/users/ingvijonasson/)
 * (@ingvijonasson)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956293)
 * I totally agree on that. The plugin does not need and should not have a setting
   page.
 *  [odouglas](https://wordpress.org/support/users/odouglas/)
 * (@odouglas)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956297)
 * Thanks, Tim, for the elegant solution. Unique Headers now works flawlessly with
   Canvas.
 *  Thread Starter [Tim Griffin](https://wordpress.org/support/users/tgriff/)
 * (@tgriff)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956298)
 * odouglas – you’re quite welcome – glad for your success!
 *  [Rand HOPPE](https://wordpress.org/support/users/rand-hoppe/)
 * (@rand-hoppe)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956301)
 * I would also like to be able to have the header be inherited by child pages.
 *  [bridieamelia](https://wordpress.org/support/users/bridieamelia/)
 * (@bridieamelia)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956302)
 * Fantastic solution: however as I am still currently studying PHP, have no diea
   how to set default header image using the woo hook? Can anyone alleviate my pain?
 *  [bridieamelia](https://wordpress.org/support/users/bridieamelia/)
 * (@bridieamelia)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956303)
 * Or better still, ignore the custom header image call if there is not one defined…
 *  [oksanaar](https://wordpress.org/support/users/oksanaar/)
 * (@oksanaar)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956304)
 * Hi there!
 * Thanks for all the detailed explanation above. I tried however to follow what
   you said but it did not work properly for me. Notes: I’m using Artificer theme
   from WooThemes, very-very basic knowledge of PHP.
 * What I did and what worked:
 * 1 – copied the code to the functions.php file
    2 – copied the woo hook code to
   the functions.php file
 * nothing happened
 * 3 – copied the <img src… > code to the header.php before the hgroup and it worked!
   Image appeared.
 * Now the problem is that the logo does not overlay the image. Despite the fact
   that the image is float:right and logo is float:left they still don’t show side
   by side, but on top of each other. Even, if they do show side by side, I don’t
   need that – I need the logo to be on top of the image.
 * I did not really understand the explanation you wrote about this issue above.
   Can you please direct me what I might be doing wrong?
 * Thank you so so so much!
 *  [Graucho Marx](https://wordpress.org/support/users/graucho-marx/)
 * (@graucho-marx)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956308)
 * Thanks for your help.
 *  [kerrytcrane](https://wordpress.org/support/users/kerrytcrane/)
 * (@kerrytcrane)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956309)
 * Good day,
 * Novice here, sorry!
 * I’m using Twenty Eleven
 * Can anyone please tell me where I place the code in the functions.php and header.
   php?
 * Thank you kindly!
 * p.s., my apology for burdening you with my inexperience and thanks again for 
   any assistance!
 *  [kerrytcrane](https://wordpress.org/support/users/kerrytcrane/)
 * (@kerrytcrane)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956310)
 * I followed the above instructions and I have 2 stacked header images on each 
   page. Any help?
 * Thank you![](http://www.affordablesocialmediasolutions.com)
 *  [bridieamelia](https://wordpress.org/support/users/bridieamelia/)
 * (@bridieamelia)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956311)
 * Hi Kerry,
 * I am not an expert, but have done this before so….
 * The functions code can just be pasted in at the end of the functions.php file–
   include the comment (//……) for reference’s sake. The header code needs to be 
   placed in relation to where you’d like it to appear in the header, eg if after
   logo, then after the logo call. You might need to do a little custom css to get
   it to sit right also.
 * Bridie
 *  [kerrytcrane](https://wordpress.org/support/users/kerrytcrane/)
 * (@kerrytcrane)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956312)
 * Thank you very much, I will try it now!
 *  [kerrytcrane](https://wordpress.org/support/users/kerrytcrane/)
 * (@kerrytcrane)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956313)
 * I adjusted the css to float: center; and it’s still justified left. Any suggestions?
   Thank you!
 *  [bridieamelia](https://wordpress.org/support/users/bridieamelia/)
 * (@bridieamelia)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/2/#post-2956314)
 * There is no such thing as float:center. You could try putting it in a div with
   a class set to text-align.
 * EG
    `<div id="center">HEADER GOES HERE</div>`
 * and in your css
 * `.center {text-align:center;}`
 * Not easy to say definitely without seeing all your code.
 * 🙂

Viewing 15 replies - 16 through 30 (of 32 total)

[←](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/?output_format=md)
[1](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/?output_format=md)
2 [3](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/3/?output_format=md)

The topic ‘[Plugin: Unique Headers] WordPress Custom Headers’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/unique-headers_c1b4ac.svg)
 * [Unique Headers](https://wordpress.org/plugins/unique-headers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/unique-headers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/unique-headers/)
 * [Active Topics](https://wordpress.org/support/plugin/unique-headers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/unique-headers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/unique-headers/reviews/)

## Tags

 * [theme customization](https://wordpress.org/support/topic-tag/theme-customization/)
 * [WooThemes](https://wordpress.org/support/topic-tag/woothemes/)
 * [wordpress function](https://wordpress.org/support/topic-tag/wordpress-function/)

 * 32 replies
 * 13 participants
 * Last reply from: [algebres](https://wordpress.org/support/users/algebres/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-unique-headers-wordpress-custom-headers/page/3/#post-2956316)
 * Status: resolved