ThemeShaper Forums » Thematic

[closed]

Header - modify

(5 posts)
  • Started 9 years ago by snackmaster
  • Latest reply from snackmaster
  • This topic is not resolved
  1. snackmaster
    Member

    How can I modify the existing Header?
    I'm looking to fit a logo, change the existing navigation, add a search box and an email icon in the header. It appears there is no way to do this without using the Theme Hook process to completely replace the existing header?

    Confused on Hooking and Headers....

    Posted 9 years ago #
  2. snackmaster
    Member

    Anyone? Reading through the forum and there a lot of questions about modifying headers.
    There don't appear to be any solid answers? Header Widgets require a Widget and go above or below existing block elements.

    I would like a Logo on the left, navigation across the bottom (floating to the right of the logo), search bar on the right, contact email, Facebook and Twitter icons at top right, no blog title and in all was going well an alternating background image.

    With non Thematic sites I'd be done with the above before completing this post. Odd to me as the whole point of Thematic is....... or am I just completely missing the obvious? Hope so! as I like the concept, the implementation and the support.

    Help!

    Posted 9 years ago #
  3. Danieliser
    Member

    Have you looked at the Thematic Featured Site Theme? It has search bar in the header.

    There are many questions about adding header images to your theme and there are many answers as well. You can either replace the entire header structure or you can add to it. Ive put some examples at http://thematic.wizardinternetsolutions.com

    Posted 9 years ago #
  4. the whole point of thematic (imo) is to provide a solid, constantly maintained, foundation.... you are free to make all kinds of changes to your theme, but since you don't touch thematic itself, you have to learn a new way to interact with it... ie hooks and filters. this is kind of a pain at first and so thematic has a definite learning curve.

    there are probably not specific posts on how to do this b/c what you are asking is accomplished by removing and adding functions from/to action hooks.

    if you take a look at:

    http://bluemandala.com/thematic/thematic-structure.html

    you can see the order of the functions in the thematic_header function. you don't want a blog title... well thematic_blogtitle() is responsible for generating that, so you'd want to remove that action.

    function remove_stuff(){
      remove_action('thematic_header','thematic_blogtitle',3);
    }
    add_action('init','remove_stuff');

    remove_action doesn't work on its own, so you must add it to the 'init' function which is called very early on in the sequence.

    plus there are posts such as:
    http://wptheming.com/2009/10/useful-thematic-filters/

    which discuss adding search bars and logos. the twitter, rss, and other badges are just a matter of wrapping their code in a function, adding that function to one of the available hooks in the header and then styling its position w/ CSS.

    function add_stuff(){ ?>
      <a href="#">A link to nowhere</a>
    <?php }
    add_action('thematic_header','add_stuff',8);

    pay attention to those numbers at the end... they are the priority (or order) the functions in thematic_header (other hooks can use priority too) get called in. in the above case i just inserted a link after the #branding div closed.

    Posted 9 years ago #
  5. snackmaster
    Member

    Thank you helgatheviking! That is the "doc" I needed.

    I read the Filters page, the Hooks page, many posts and a few blogs. I didn't get it so I waited a day and did it all again, and then once more. You're post + bluemandala's page structure graphic tied it all together. I was about to bail and go back to hacking themes...

    peace, snack

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.