Action Hooks

Knowledgebase Docs » ShiftNav
USEFUL? 5

shiftnav_before

Inject PHP before the menu within the ShiftNav Panel. The $id argument is the ID of the ShiftNav instance.

add_action( 'shiftnav_before' , 'sn_before_menu', 10, 1 );
function sn_before_menu( $id ){

	// Target the main panel
	if( $id === 'shiftnav-main' ){
		echo 'My Custom Content Before Menu';
	}
}

shiftnav_after

Inject PHP after the menu within the ShiftNav Panel. The $id argument is the ID of the ShiftNav instance.

add_action( 'shiftnav_after' , 'sn_after_menu', 10, 1 );
function sn_after_menu( $id ){

	// Target the main panel
	if( $id === 'shiftnav-main' ){
		echo 'My Custom Content After Menu';
	}
}