ThemeShaper Forums » Thematic

[closed]

how to insert div in footer

(1 post)
  • Started 8 years ago by greenandi
  • This topic is resolved
  1. what i wanted is to insert div after div#subsidiary,

    in my thought,
    if add_action('thematic_footer', 'thematic_subsidiaries', 10); the position number is 10, and add_action('thematic_footer', 'thematic_siteinfoopen', 20); the position number is 20,
    meaning i can put anything before 10 and between 10 to 20.

    so,i did this in function.php

    function footer_mainfooter() { ?>
    <div id="main-footer">
    <?php }
    add_action('thematic_footer', 'footer_mainfooter',9);

    function footer_insert_div() { ?>
    <div id="social" class="aside">
    <h3>follow me on twitter</h3>
    </div>
    <?php }
    add_action('thematic_footer', 'footer_insert_div'11);

    function footer_close_div() { ?>
    </div>
    <?php }
    add_action('thematic_footer', 'footer_close_div',12);

    and it works.it creates

    ...div#footer...
    <div id="main-footer"> (9)
    <div id="subsidiary">
    ...div#widget goes here...
    </div>
    <div id="social"> (11)
    ...social network goes here...
    </div>
    </div> (12)
    ...div#siteinfo...

    im happy for awhile, but im still not sure with my method, is the position numbering is the right thing to do?
    is there any other alternative or better way to achieve this ?

    thanks

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.