ThemeShaper Forums » Power Blog


Multiple Header graphics for Power Blog

(13 posts)
  • Started 12 years ago by cryptoking
  • Latest reply from nimmolo


  1. If I missed it, I'm sorry about this post. I'm wondering how to incorporate different header graphics for different pages of my site. For example the homepage header graphic is different than the "about me" header graphic and so forth.

    I see in the style.css the header code but all I see is a way to replace one global header graphic. Need help, thanks in advance.

    Posted 12 years ago #
  2. You may find this helpful.


    Posted 12 years ago #
  3. sober

    i use the Dynamic header plugin by nicasio design . It works fine for me

    Posted 12 years ago #
  4. tbreschi

    @Sober, hello! I've been attempting to use that Dynamic header plugin but I can't figure out where to place the PHP code.

    Currently, I have my header image under #branding - as a background img (not sure if this is correct). Could you please suggest the best practice for implementing this plugin?


    Posted 12 years ago #
  5. @sober, @tbreschi --

    I would totally love to get the Dynamic Header Plugin to work in Thematic. If you could say where you put the php snippet for that, I would be so happy.

    Actually I bet many people would be really happy.

    Posted 11 years ago #
  6. Danieliser

    You could use the script found at and simply add the code into the span added to functions.php

    im using something similar to add not only a header image with link but also a javascript image/featured post slider. you can see it in my sandbox currently at

    Posted 11 years ago #
  7. @Danieliser that is a good technique. Since I am using a taller image for the home page and shorter header image for the rest, may be I would need a condition to test for home.

    I'm new to PHP so I don't know how to do this.

    Posted 11 years ago #
  8. Okay i got the Dynamic Header plugin working in Thematic.

    Turns out there's just no getting around reading about action hooks.

    Here is the code that works when added to functions.php

    //add dynamic header plugin snippet to header
    function dh_snippet() {
    add_action('thematic_header', 'dh_snippet',4);

    Of course this only works with the Dynamic Headers plugin enabled.

    Posted 11 years ago #
  9. at my page (power blog i integrated the snippet ftom bluejpro. when i take a look in the webbrowser it seems that it works but there is some trouble with the image....perhaps is a broken link or something like that:

    Posted 11 years ago #
  10. nimmolo


    This is ancient history, this thread, but I've got a specific question about the action hook you proposed. I have Dynamic Headers installed. I tried hacking this action hook into the header-extensions.php, the WRONG way ;), and it worked. But after removing it and putting it in the proper way, in the child theme functions.php, it's giving me trouble making that action hook work. I'm getting

    "Parse error: syntax error, unexpected T_FUNCTION in /...path/wp-content/themes/thematic-two/functions.php on line xx" (specifics edited out for clarity)

    I've used code almost identical to yours in the childtheme functions.php.

    // Display dynamic header image
    function dh_show() {
    if(function_exists('show_media_header')) {

    Note: This code worked when placed improperly in header-extensions.php. According to my feeble understanding, it's not working in the child theme functions.php because maybe the function 'show_media_header()', created by the dynamic header plugin, hasn't loaded yet - but that could be all wrong.

    Posted 10 years ago #
  11. nimmolo


    It was a simple syntax error, missing ; in line above.


    Posted 10 years ago #
  12. Hi Nimmolo -

    You do NOT want to hack the code of the parent theme, Thematic itself (header-extensions.php) because the whole concept of Thematic is as a framework, which is updated periodically, and, due to its core programming, it is easy to do what you need in any child-theme you create. For your function, you would do it in the "functions.php" file of the child theme. This allows you to keep clear of the parent Thematic framework so when you update it you don't overwrite any customizations.

    • Solution 1: Function and Hook: To help you understand what to do, I have prepared a Thematic hook (and widget) guide here: Download the PDF guide there and pay special attention to the PHP Function and Action Hook callout on the left side near the top. You would target the appropriate location and add code to show different headers at different locations.
    • Solution 2: A CSS/Page Template Solution: You can see how the header changes on three different sections we did here: | | <-- to make those change, since CSS can designate different page templates in code, we simply placed a different header image in "branding" for each section of pages. ie. #branding {background: url(images/affluent-families-head.jpg) no-repeat;}. Note that some coders like to do it ALL in functions, but I like to use CSS when possible, and I still make page templates from time to time/
    • Gene referenced an earlier pure CSS solution on this thread. I like having a special page template available, so that the client takes a role in knowing exactly which pages get which header, and can easily change that using different page templates.

    Cheers -

    Posted 10 years ago #
  13. nimmolo

    Scott- Thanks! Just getting your reply.

    I am aware that it's not good to hack anything in the Thematic code - it was just my little experiment there, and I was way more ignorant then than I even am now, which is saying something. I did get it working in childtheme functions.php, sorry that wasn't clear.

    I've downloaded your PDF - VERY helpful.

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.