|

Add HTML Elements Using Hooks

You can use hooks to add html elements such as wrapping divs to your templates. Here is an example that I used in a Woo theme. You have to adapt it according to your theme.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
// Add footer widget container
add_action( 'woo_footer_top', 'footer_widgets_container_start', 8 );
function footer_widgets_container_start() { ?>
	<!--#footer-widgets-container-->
    <div id="footer-widgets-container">
<?php	
}
add_action( 'woo_footer_before', 'footer_widgets_container_end' );
function footer_widgets_container_end() { ?>
    </div><!--/#footer_widgets_container_end-->
<?php	
}
?>

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *