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.
<?php 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.
Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!
How to easily wish a merry Christmas to your blog readers