ThemeShaper Forums » Thematic

[closed]

Wrap #primary in a new Div

(6 posts)
  • Started 12 years ago by optimus203
  • Latest reply from helgatheviking
  • This topic is resolved
  1. Hey everyone. I'm new to Thematic and PHP, and hoping to get some help on this small issue. I'm trying to wrap the #primary widget div in a new div. Can anyone provide the proper function to help make this happen? Any help would be greatly appreciated.

    Posted 12 years ago #
  2. open the div on the thematic_abovemainasides hook and close the div on the thematic_betweenmainasides hook.

    Posted 12 years ago #
  3. Perfect. Loving the ease of this framework. Thank you kindly. Take care...

    Posted 12 years ago #
  4. Is there any way to see the code for Helga's suggestion: "open the div on the thematic_abovemainasides hook and close the div on the thematic_betweenmainasides hook." I tried a couple of ways but came up empty handed...

    Posted 11 years ago #
  5. Well I found a way but I'm not sure if it's bloated or not. This is what I have:

    // ADD DIV ABOVE AND BELOW PRIMARY ASIDE STARTS HERE
    
    // Begin div ABOVE primary aside
    function start_aside_top() { ?>
    
    <!-- aside wrap starts here -->
    <div id="aside-wrap-top">
    
    <?php } // end of our new function start_aside_top
    
    // Add starting div to above primary aside
    add_action('thematic_abovemainasides','start_aside_top');
    
    // Begin closing div to above primary aside
    function end_aside_top() { ?>
    
    </div>
    <!-- aside wrap ends here -->
    
    <?php } // end of our new function end_aside_top
    
    add_action('thematic_abovemainasides','end_aside_top'); 
    
    // Begin div BELOW primary aside
    function start_aside_bottom() { ?>
    
    <!-- aside wrap starts here -->
    <div id="aside-wrap-bottom">
    
    <?php } // end of our new function start_aside_bottom
    
    // Add starting div
    add_action('thematic_betweenmainasides','start_aside_bottom');
    
    // Begin closing div
    function end_aside_bottom() { ?>
    
    </div>
    <!-- aside wrap ends here -->
    
    <?php } // end of our new function end_aside_bottom
    
    // Add closing div
    add_action('thematic_betweenmainasides','end_aside_bottom'); 
    
    // ADD DIV ABOVE AND BELOW PRIMARY ASIDE ENDS HERE
    Posted 11 years ago #
  6. it's bloated b/c you don't need 2 functions to hook into thematic_abovemainasides. if you need 2 divs, just put them both in one function.

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.