Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook into wp_head() and wp_footer() #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tha-example-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -65,6 +64,6 @@

<?php tha_footer_bottom(); ?>
</div><!-- #footer -->
<?php tha_footer_after(); ?>
<?php wp_footer(); ?>
</body>
</html>
2 changes: 2 additions & 0 deletions tha-theme-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );


/**
Expand Down Expand Up @@ -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' );
Expand Down