dynamic headers plugin

  • nick_blix

    #958

    Hi I would like to have custom headers for pages. I can use the dynamic headers plugin but I’m not sure where to enter the plugin code for graphene to recognize it. The dynamic header instructions indicate to put it in the header.php but so far that has just caused the page to crash. Anyone else used this plugin with graphene?

    Admin

    Syahir Hakim

    #14078

    Firstly, it’s not recommended to modify the theme’s files directly, as you would lose those modifications the next time you update the theme.

    Secondly, the theme already has the feature you’re trying to achieve using the plugin. If a post has a featured image that’s greater than or equal to the header dimension (960px x 198px), the theme will automatically replace the header image with that post’s Featured Image when the post is being displayed.

    If you still would like to use the Dynamic Headers plugin, create a child theme, and then create a new file called functions.php inside the child theme’s folder, and then add this code:

    <?php
    function graphene_dynamic_header(){
    if(function_exists('show_media_header')){
    show_media_header();
    }
    }
    add_action('graphene_header', 'graphene_dynamic_header');
    ?>

    You will need to modify the styling of the dynamic header (e.g. positioning, z-index, etc.) using your child theme’s style.css file.

    nick_blix

    #14079

    Thanks, I realized after the fact that I could use the featured image tool. Thanks for the reply.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!