-->

Genesis Hook - Genesis Framework - Long Viet Web Web Design Unit

    The hooks integrated into Genesis are used to modify or add functionality to the core theme of the Genesis Theme.

    This post is for an overview of the different types of actions and filters you'll see in Genesis Framework .

    Genesis Hook
    Genesis Hook

    Genesis Developer diary

    The first time I started working with Genesis, I was always looking for ways to add content to a specific position in child themes. It took me a lot of time to learn about the hooks in Genesis, the documentation here.

    But watching it sometimes can not remember all, it is tiresome to add the function to see the document. I found another document that helps me see Genesis's hooks right on the Genesis Child Themes I'm developing here.

    Now when you read my article, you don't need to be as hard as me anymore, below is the code I wrote to help you.

    Function.php file

    The code below helps you to display all of the Genesis Framework's hooks. Please use it as a function by copying and pasting into the file. finction.php child theme.

    Once the theme is developed, you can remove it from the theme.

      // Display action-hook Genesis.  add_filter( 'all', 'genesis_action_hook' );  function genesis_action_hook () {  	global $wp_actions;  	if( ! is_admin ( ) ) {  		$current_action = current_filter();    		if ( 'genesis_' !== substr( $current_action, 0, 8 ) ) {  			return;  		}    		if ( ! isset( $wp_actions( $current_action ) ) ) {  			return;  		}    		echo '
    ' . $current_action . '
    '; } }

    Epilogue

    So you can see all of the Genesis Framework hooks. Now in the development phase of Genesis Child let this function work.

    I hope you find this guide helpful. If so, consider sharing it with your audience!



    ->

    No comments