WordPress.org

Support

Support » Themes and Templates » [Plugin: Dynamic Headers] to template pages

[Plugin: Dynamic Headers] to template pages

  • I’ve used the Dynamic Headers plugin to change the header of each page. However I haven’t been able to get it to work on individual templates.

    I have two custom post types, each using their own template file. I’ve tried passing a variable in both the templates to the header file, but it didn’t work. I also tried using an if statement in the header.php file to grab the body class and pass a string to $dynamic_header_url, but it then applies to every page on the site.

    <div id=”container”>
    <?php if(function_exists(‘dh_get_page_image_url’)){ $dynamic_header_url = dh_get_page_image_url();
    if ($body_class=’single-writing’){$dynamic_header_url = ‘header-page-6.jpg’;} }

    Do you see what I could be doing wrong?
    Thaannk you!!

  • The topic ‘[Plugin: Dynamic Headers] to template pages’ is closed to new replies.