Eigenen Code ausführen mit add_action

add_action('wp_enqueue_scripts','themeslug_enqueue_script');

Eigene Hooks erstellen mit do_action

do_action( 'my_hook' );

add_action( 'my_hook', 'sayHello' );

function sayHello(){
    echo 'Hallo Welt';
}