I have two versions of the simplest function that hooked to the wp_head
action.
One is working, andother one is not.
Can someone explain?
// Works !
function custom_description() {
?>
<meta name="description" content="cococo" />
<?php
}
// Does not work
/*
function custom_description() {
return '<meta name="description" content="cococo" />';
}
*/
add_action( 'wp_head', 'custom_description' );