Skip to content

Instantly share code, notes, and snippets.

@nickberens360
Last active December 21, 2015 00:38
Show Gist options
  • Save nickberens360/6221339 to your computer and use it in GitHub Desktop.
Save nickberens360/6221339 to your computer and use it in GitHub Desktop.
Register a widget then display
//Registers a widget named footer-widget
if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'footer-widget',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
//Display ""footer-widget" in the footer
<footer>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-widget') ) : ?>
<?php endif; ?>
</footer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment