Skip to content

Hook into wp_head() and wp_footer() #4

Open
wants to merge 2 commits into from
View
3 tha-example-index.php
@@ -2,7 +2,6 @@
<head>
<?php tha_head_top(); ?>
<title>This is an example page</title>
- <?php tha_head_bottom(); ?>
<?php wp_head(); ?>
</head>
<body>
@@ -65,6 +64,6 @@
<?php tha_footer_bottom(); ?>
</div><!-- #footer -->
- <?php tha_footer_after(); ?>
+ <?php wp_footer(); ?>
</body>
</html>
View
2 tha-theme-hooks.php
@@ -53,6 +53,7 @@ function tha_head_top() {
function tha_head_bottom() {
do_action( 'tha_head_bottom' );
}
+add_action( 'wp_head', 'tha_head_bottom', 99999 );
/**
@@ -164,6 +165,7 @@ function tha_footer_before() {
function tha_footer_after() {
do_action( 'tha_footer_after' );
}
+add_action( 'wp_footer', 'tha_footer_after', 99999 );
function tha_footer_top() {
do_action( 'tha_footer_top' );
Something went wrong with that request. Please try again.