DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

It’s Christmas today! So what about wishing merry Christmas to your readers? In this simple recipe, we’ll see how easy it is to implement a “Merry Christmas” message in your WordPress blog.

To achieve this very simple recipe, simply paste the following code anywhere on your theme. The “Merry Christmas” message will be displayed only on Christmas day.

if ((date('m') == 12) && (date('d') == 25)) { ?>
    <h2>Merry Christmas from WPRecipes!</h2>  
<?php } ?>

By the way, merry Christmas to all of you! Have a great time with the family.

Leave a Comment

Your email address will not be published. Required fields are marked *