ThemeShaper Forums » Thematic

[closed]

Modify theme structure

(6 posts)
  • Started 1 year ago by pm
  • Latest reply from pm
  • This topic is resolved

Tags:

  1. pm
    Member

    I need to modify the theme structure. I can't find an answer and how to do that.

    From the initial themathic structure :

    <body>
      <wrapper>
        <header></header>
        <main></main>
        <footer></footer>
      </wrapper>
    </body>

    To this structure :

    <body>
      <header></header>
      <wrapper>
        <menu></menu>
        <main></main>
        <sidebar></sidebar>
      </wrapper>
      <footer></footer>
    </body>

    Thanks for your help. It will be really appreciated.

    Posted 1 year ago #
  2. bogh
    Member

    Hi,

    To move the menu try this:

    // Remove the standard Thematic menu
    function remove_menu() {
    	remove_action('thematic_header','thematic_access',9);
    }
    add_action('init', 'remove_menu');
    
    // Moving the thematic menu above the main div
    add_action('thematic_abovecontent','thematic_access', 1);

    You can find the action hooks here: http://visualizing.thematic4you.com/

    Posted 1 year ago #
  3. to place something outside of the #wrapper div you'll need to add it to the thematic_before() hook.

    the actual #header div itself is hard-coded, but you can empty out all of its contents.

    Posted 1 year ago #
  4. pm
    Member

    Thanks to you two for your answers.

    So, i just need to write two functions to place the header outside the wrapper and after <body> but leaving the menu inside the wrapper.

    Same thing for the footer which i need to place outside the wrapper but after the wrapper closing tag.

    Is it possible to do that ?

    Posted 1 year ago #
  5. Just don't use the wrapper at all.

    Make a new div with a class other than wrapper and set it on the hooks thematic_belowheader() and thematic_abovefooter().

    // add random div
    function snix_open_quick_div() { ?>
        <div class="content-wrapper">
    <?php }
    add_action('thematic_belowheader','snix_open_quick_div');
    
    // close random div
    function snix_close_quick_div() { ?>
        </div> <!--  .content-wrapper -->
    <?php }
    add_action('thematic_abovefooter','snix_close_quick_div');

    Obviously you will still need to move the menu, but bogh takes care of that.

    Posted 1 year ago #
  6. pm
    Member

    Thanks for your help.

    i succeeded in doing what i want.

    Posted 1 year ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.