I have a child theme in which I created a page template. I am able to show different content based on time of day by writing some PHP inside the actual page e.g.
if ( $time < '10:00'){
echo "The time is 10am and good morning.";
}
else
{
//show the page loop.
}
I would like to show the message if it matches the condition if not then the usual page loop should be executed.
Will it be possible to do that using a plugin instead of creating page templates for each of my sites? It will be a lot easier just to install the plugins.