Support » Plugin: Unique Headers » how to get this plugin working with a cherry framework childtheme?

  • Resolved eX1337


    Im using the latest version of the cherr framework with a child theme and wanted to set a custom header for each post/site.

    No Plugin is working because my theme doesnt support custom headers and i cant get this working.

    I tried to add

    $args = array(
    	'flex-width'    => true,
    	'width'         => 980,
    	'flex-height'    => true,
    	'height'        => 200,
    	'default-image' => get_template_directory_uri() . '/images/header.jpg',
    add_theme_support( 'custom-header', $args );

    into header.php/index.php/functions.php, but no change at all.


Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Ryan Hellyer


    You don’t seem to have any code in your header.php for adding the custom headers.

    yes, i posted the content of the original header.php because it didnt had any effect – no matter wherever i paste this code.

    Plugin Author Ryan Hellyer


    Oh, you mean the code you posted inside your comment above? That would belong in your functions.php file (usually), but you also need code in your header.php file to actually load the header. The code you posted simply tells WordPress that your theme supports custom headers, it doesn’t actually display the header.

    So, how can i display it using header.php? the structure of my theme is confusing me a lot tbh and im not really experienced in php.

    there is a static header image in my theme called “bg_header.jpg” but i dont know how its beeing loaded.

    Plugin Author Ryan Hellyer


    Throw this into your header.php file and see what happens 🙂

    <img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />

    This chunk of code might by why you are confused when looking in your header.php file. It’s calling another PHP file which it loads at that point.
    <?php get_template_part('wrapper/wrapper-header'); ?>

    Wow, thanks for the Answer!

    I pasted your code into header.php with no result. But if i paste this code into my wrapper-header.php it works!

    Thanks a lot.

    Plugin Author Ryan Hellyer


    Were you pasting into the parent themes header.php file by any chance? If you did that, then it would be overruled by the child theme file instead.

    I tried both header.php-Files, but it didnt work for me.

    Can u tell me where the “get_custom_header()->width/height” is set?

    If i change the dimensions via the wordpress mediathek it doesnt have any effect. So, the picture is visible now but it’s really small. Much smaller then the original image-file.

    Plugin Author Ryan Hellyer


    You posted the code for that in your first post 😉 It’s the bit you put in your functions.php file.

    Plugin Author Ryan Hellyer


    You can just remove that height altogether and rely on the browser working out the height of course. This is often preferable if it needs to expand and contract to mobile browser widths.

    Im unable to do that :-/

    If im trying to paste the code of my first post into header.php or wrapper-header.php it doesnt change anything.

    even if i just use ur code <img src="<?php header_image(); ?>" height="600" width="1500" alt="" />

    it doesnt change the imagesize – its still really small. (the picture is 1700 x 803)

    Plugin Author Ryan Hellyer


    Oh, so you want to increase the actual size of the physical image? In that case you’ll need to edit the code in your functions.php file.

    ‘physical image’? i just want to get this image displayed in full size. take a look at my testpage:

    and i dont see attributes for that in my functions.php-file / i cant use the code above.

    i would love to employ u for that but ive already read that u dont do paid jobs D:

    Plugin Author Ryan Hellyer


    You don’t need to pay me, we can figure this out 🙂

    I’m assuming this is the image you are stuck on? It’s huge, but not rendering correctly on your site due to some CSS.

    If you want to pay someone to fix this, I can send some other devs to come help if you like. This should be fairly easy to get working.

    oh, nice to know it wasnt straight my fault this time 😛

    sounds good, can i chat with them somehow? they can contact me via “” too.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘how to get this plugin working with a cherry framework childtheme?’ is closed to new replies.