I am trying to play with the Hello Dolly plugin. I want that plugin to work on the front end. Is it possible to bring Hello Dolly to the front end? Or will that affect my existing website?


In your theme, add a custom action in a template where you want to show the output:

do_action( 'show_lyrics' );

This does nothing for itself. Now you can add the function hello_dolly as a callback for that action in your functions.php:

if ( function_exists( 'hello_dolly' ) ) {
    add_action( 'show_lyrics', 'hello_dolly' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.