I am trying to hook my plugin to my custom hook in my header.php but it doesn't seem to work but if i hook to my header through the function.php everything works perfectly. Does anyone have any idea how I can get it to work.
header.php
<?php logo_hook(); ?>
function.php
function logo_hook(){
do_action('logo_hook' );
echo 'function is working';
}
logo.php //this is my plugin
add_action( 'logo_hook', 'displayLogo');
function displayLogo( $text ) {
$logo .= 'Plugin text...';
return $text ;
}