WordPress.org

Ready to get started?Download WordPress

Forums

DYNAMIC HEADERS in Twenty Eleven (7 posts)

  1. elames
    Member
    Posted 1 year ago #

    I have the Dan Cannon dynamic headers installed on my site. It tells me to put this code into the header.php.
    <?php if(function_exists('show_media_header')){ show_media_header(); } ?>

    I have tried in various locations and it never works. It gives me error message and then I have to upload a new header.php so I can even get back into my site.

    HELP!!! PLEASE. Where EXACTLY does this code go?

    Thanks alot

  2. elames
    Member
    Posted 1 year ago #

    Can't anyone please give me a simple answer on this.

    thank you!

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    make sure to work with a child theme of Twenty Eleven - do not edit Twenty Eleven directly; http://codex.wordpress.org/Child_Themes

    Where EXACTLY does this code go?

    that depends on where exactly you want to show those dynamic header media.

    do you want to replace the existing header image with the plugin output?

    It gives me error message

    what error message exactly?
    can you post a link ot your site to illustrate what you have so far?

    you are possibly breaking the php code syntax;
    some basics: http://php.net/manual/en/index.php

  4. elames
    Member
    Posted 1 year ago #

    Hi
    I wanted to use the dynamic header in the header. I have used it before in other sites I have done. I placed it in the header code where I have before and it messed up the page. I could not get back into my site. I had to ftp a new header.php to get back in.

    I finally gave up and just put a featured image on each page. But I still want to know what went wrong.
    Another post said to put it after "Houston we have a new....

    <?php if(function_exists('show_media_header')){ show_media_header(); } ?>

    That's what gave me the error.

    thanks

  5. elames
    Member
    Posted 1 year ago #

    Here is the site I was trying to put it on:
    http://www.acottagetoremember.com/wordpress

    Here is a site I use it on:

    http://www.whfarmfoundation.org

    I don't understand why it works with one and not the other.

  6. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    it seems that in the working site, you have replaced the full header image section, including search bar, with the plugin code.

    assuming you have a copy of header.php of Twenty Eleven 1.3 in your child theme, this would be the full section which you could replace with the plugin code:

    http://pastebin.com/wLdVgiME

    if you are working with a copy of header.php of Twenty Eleven 1.4, then you could replace this section:

    http://pastebin.com/wtuAbD9H

  7. elames
    Member
    Posted 1 year ago #

    Thank you I will give it a try in a bit to see if this does the trick.

    Appreciate your assistance

Topic Closed

This topic has been closed to new replies.

About this Topic