Forums

Twentyten - How to use filter/hooks to relocate header or footer? (4 posts)

  1. spuddle
    Member
    Posted 1 year ago #

    I am exploring child templates for the first time and enjoying the power that they offer, all my new projects will now be child themes based on the default theme.

    However I've come up against my first issue, for a design that involves full width headers and footers, I need the mark-up for these sections to reside OUTSIDE of the wrapper container.

    Right now all the content is inside the main wrapper, can I use filters or hooks to relocate the header and/or footer to be outside the wrapper, only using functions.php?

    Or is my best bet to create new template files that define the new HTML hierarchy?

  2. dkristine
    Member
    Posted 1 year ago #

    Just create a new page template and put it in your child theme directory... If I am understanding correctly...

    You can recreate the page tpl file, put it in your child theme directory and it will by default supersede the parent theme template.

    I hope this helps :)

  3. spuddle
    Member
    Posted 1 year ago #

    Thanks for your comment, this would be the fall back solution for sure but I think the future of WP theming is using filters and hooks to modify the parent theme without having to resort to your own index.php header.php etc. This is just a much cleaner and forward thinking way of developing so that upgrading WP doesn't break your theme..

    So any php gurus out there that can help? Thematic theme has a lot more support for people using filters and hooks only it seems so I may switch to that theme as my parent..

  4. BRIXBOSTON
    Member
    Posted 1 year ago #

    I sort of asked the same thing in my most recent post (not exactly) but did you get the answer?

Topic Closed

This topic has been closed to new replies.

About this Topic