This code enables you to hook a function after the last widget in any widget area. Your function or content will output within the widget area. This enables you to call a function from a plugin in any widget area without using a shortcode.
Example: The following code hooks a template tag ( function call ) after any widgets active in the widget area with a i.d of home-top.
add_action( 'genesis_after_home-top_widget_area', 'hook_after_widget' );
function hook_after_widget() {
if ( function_exists( 'social_warfare' ) ) :
your_template_tag();
endif;
}
Usage
1. Swap out home-top in the hook with the i.d of your widget.
2. Also, swap out your_template_tag
with the name of the template tag or function call from your plugin or theme.
Was This Tutorial Helpful?