• Resolved dquelhas

    (@dquelhas)


    Hi there,

    I have successfully installed the Dynamic Headers plugin and all looks fine. It saves the settings, uploads the images, allows me to choose an image per page or post, etc..

    The problem I have is that in the installation notes they say that I should dump the code <?php show_media_header(); ?> in my theme file.

    So I have tried it in several pages and now it’s sitting it in the header file (header.php) and the only thing it does is to duplicate my header image, as you can see in https://punchbag.dinisquelhas.com/

    What file should I edit in the default theme to insert this code snippet and make this very promising plugin to work?

    Thanks in advance,

    Dinis

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter dquelhas

    (@dquelhas)

    Ok, I found a way to add the “dynamic headers” headers properly to the default theme with just a couple of changes:

    Under Appearance, choose editor.

    Start editing the header file (header.php).
    Find <body <?php body_class(); ?>> and place the <?php show_media_header(); ?> under it.

    Something like:

    <body <?php body_class(); ?>>
    <?php show_media_header(); ?>

    Update the file.

    Now, start editing the css file (style.css).
    Find /* Begin Typography & Colors */.
    Find #header and add display: none; under this section.
    Then find /* Begin Structure */.
    Find #page and change margin: 20px auto; to margin: 0 auto;

    Update the file.

    This should put the headers in the right place.

    It brings a validation problem reported by the w3c validator, but I guess it’s just a small change required from the plugin author:

    Line 28, Column 30: required attribute "type" not specified
    
    <script language="javascript">AC_FL_RunContent = 0;</script>

    Cheers,

    Dinis

    I am wondering, how to use Dynamic Headers with the Artisteer theme builder for WordPress. Directions For Use of this plugin are only for default WordPress theme, because the Artisteer theme file head.php looks quite different as Default theme. Please, help!

    Peacetraveler,

    did you try these directions?

    5. Now you will need to add the template tag created by the plugin to your theme file where you want your dynamic header to appear (this will usually be in wp-content/themes/your-theme-name/header.php).

    Simply drop the this line of code into your theme file

    <?php show_media_header(); ?>

    for my theme, it looked like this in the header.php file after i pasted it in:

    </head>
    <body <?php body_class(); ?>>
    <div id="page">
    
    <?php show_media_header(); ?>

    Hi Peacetraveler

    Regarding your question about Dynamic Headers with the Astisteer theme builder.

    The way to go is simple:

    0. Follow the direction step 1-6
    1. Take the code you find in the plugin directions:
    <?php if(function_exists(‘show_media_header’)){ show_media_header(); } ?>

    2. Open header.php in the editor.

    3. At the wery bottom you find the code:
    </div>
    <div class=”art-Header”>
    <div class=”art-Header-jpeg”></div>
    </div>

    4. Insert the code just before </div> and make it look like:
    </div>
    <div class=”art-Header”>
    <div class=”art-Header-jpeg”></div>
    <?php if(function_exists(‘show_media_header’)){ show_media_header(); } ?>
    </div>

    Example:
    https://www.youdrivethebus.com/
    https://www.youdrivethebus.com/about/receptet-pa-framgang

    Peace out

    hi, everybody,

    i’ve run up against a roadblock. i have a very strong understanding of css. but php throws me.

    the plugin author is suggesting the following:
    You will need to use the $dynamic_header_url = dh_get_page_image_url(); function, and use the $dynamic_header_url variable
    and:
    if you are seeing 2 headers, you will need to create an inline style in the Head section of your header.php file

    i tried the suggestions. This is what i did:

    i placed the the following function in my “functions.php”:
    $dynamic_header_url = dh_get_page_image_url();

    but how do i leverage this snippet: $dynamic_header_url variable

    and how does is this php controlled using css? i don’t understand the connection between the css and php that makes this code work.

    anyone?

    here is a link to the production site i’m working on (as of 1/29/09): https://project.bucktowndigital.com

    any help is much appreciated.

    I think I figured out how to get this plugin to do what many others (like myself) are trying to do, with pretty minimal work. The problem I was having was that while Option 1 seemed easiest (and the only way I could actually figure out how to get the image to show up at all!), the flexibility of option 2 would be nice – to be able to add styles and whatnot. Here’s my simple fix. Go to the plugin folder and open the custom-header.php file. Scroll down to about line 360 where the following line is:
    echo '<img src="'.$dhnd_image_url_base.$load_this_media.'" alt="'.$dhnd_alt_tag.'" title="'.$dhnd_alt_tag.'" />';

    Add the following before the closing tag />'"; part:
    id="logo"

    Instead of logo, use whatever id you want. Then simply place CSS info in your stylesheet for how that should behave. That, combined with the physical placement of the initial call code (as defined in Option 1 in the directions), should allow you to place the image/header/logo wherever you want!

    Hope that helps someone.

    Hi all!

    What a great plugin this is. I am also using Atahualpa as my theme, and highly recommend it!

    QUESTION: How do I make a ‘scrolling image’ header with dynamic header. I would like my homepage only to have this scrolling image header, and then other headers for other pages. I’ve got everything but the scrolling image header portion.

    Thanks!!
    Kelsey

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Dynamic Headers] Default theme’ is closed to new replies.