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?
1 Answer
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' );
}