ThemeShaper Forums » Thematic

Placing the header into a sidebar

(5 posts)
  • Started 12 years ago by killtheliterate
  • Latest reply from amygail
  • This topic is not resolved


  1. I've just begun working on a child theme for Thematic. A very new experience. I've built themes before with sandbox, but this is new and terrifying.

    i'm trying to create a blog with a fixed position sidebar, and would like the header info to display in this sidebar. any help moving the header into a sidebar?

    Posted 12 years ago #
  2. Zombaya

    Well, you'll have to make a custom header.php in you child-theme-directory which does not display the header-information. You could make this into:

    <?php thematic_create_doctype(); echo " "; language_attributes(); echo ">\n";?>
    <head profile="">



    wp_head(); ?>


    <body class="<?php thematic_body_class() ?>">
    <?php thematic_before(); ?>

    <div id="wrapper" class="hfeed">

    <div id="main">

    Then you'll have to add that information to your sidebar. To do this add the following to your functions.php:

    function add_sidebar_header() { ?>
    <?php thematic_aboveheader(); ?>

    <div id="header">
    <?php thematic_header() ?>
    </div><!-- #header-->

    <?php thematic_belowheader(); ?>
    <?php } ?>

    <?php add_action ( 'thematic_abovemainasides', 'add_sidebar_header' ); ?>

    If all goes well, then your header should be within your sidebar. There could be an error in the code since I'm just writing it as it comes up, haven't checked it. The idea behind my solution is to remove the header above the content and to add it with a function to the hook thematic_abovemainasides.

    Posted 12 years ago #
  3. amygail

    Why not just change the position of the header via css?

    Posted 12 years ago #
  4. i just placed <?php thematic_header() ?> in the childtheme sidebar.php

    Posted 12 years ago #
  5. amygail

    That works visually, but if you look at your source code, all of your content comes before your branding, menu etc.
    This can cause some issues with seo and accessibility (screen readers, mobiles, etc)
    For comparison go to and look at the source code (or better, disable css in your browser - do the same with your site and see the difference..

    The visual effect you've got would be pretty easy to accomplish with css.

    Posted 12 years ago #

RSS feed for this topic


You must log in to post.