Skip to content

Instantly share code, notes, and snippets.

Created Nov 24, 2016
What would you like to do?
TTB action hook sidebar
// code to add to functions.php
* Define the action hook.
function sidebar_bottom_hook() {
do_action( 'sidebar_bottom_hook' );
* Attach some function to the hook
add_action( 'sidebar_bottom_hook', 'sidebar_action_example' );
function sidebar_action_example() {
echo '<div>This is a some content added to the bottom of the sidebar using the sidebar_bottom_hook.</div>';
// code to place the hook in the sidebar
<?php sidebar_bottom_hook(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment