• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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.

Action Hooks

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags