ThemeShaper Forums » Thematic

[closed]

Add div after the <body> tag: shadows

(3 posts)
  • Started 4 years ago by Baudesign
  • Latest reply from Baudesign
  • This topic is resolved
  1. Baudesign
    Member

    Hi everyone,

    I am trying to add two <div> tags just after the <body> tag like so:

    <div id="ombre-gauche">
    <div id="ombre-droite">

    ...in order to recreate the shadow effect that we can find on http://www.mbdragan.com/ web site, which is pretty cool by the way.

    All this with the function.php file. And I just cannot figure out how to add those div with a function.

    Any idea?

    Thanks in advance.

    Pat

    Posted 4 years ago #
  2. Wrap your content in a function and hook it into an action.

    function my_shadow_divs() {?>
        <div id="ombre-gauche">
        </div>
        <div id="ombre-droite">
        </div>
    <?php }
    add_action('thematic_before','my_shadow_divs');

    This diagram will help you see the general structure and available actions of thematic.

    -Gene

    Posted 4 years ago #
  3. Baudesign
    Member

    Gene,

    Wonderful! Thanks, it works beautifully, and thanks for the diagram. Great tip!

    Pat

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.