I'm trying to set a custom page title (<title></title>
) with wp_title
.
The simplest function in the world:
function sweety_page_title($string)
{
echo $string . ' - ';
}
After I call:
do_action('wp_title', 'my title...');
add_action('wp_title', 'sweety_page_title', 10, 1);
But it does not work.
Where am I wrong?