Genesis Hook Template Tag or Function Call After Widget

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?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.