This video shows you how to have different Elementor created content displayed above the header using Astra Pro’s Custom Layouts.
Additional resources used:
Required code below video.
<?php $weekday = date('l'); switch ($weekday) { case "Monday": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "Tuesday": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "Wednesday": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "Thursday": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "Friday": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "Saturday": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "Sunday": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; } ?>
<?php $month = date('F'); switch ($month) { case "January": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "February": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "March": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "April": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "May": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "June": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "July": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "August": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "September": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "October": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "November": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; case "December": echo do_shortcode('[INSERT_ELEMENTOR id="XXX"]'); break; } ?>
Congratulations on your time!
thank you
You’re welcome 🙂
Cheers!
Lyle
Thanks for this video! I could follow it easily, however when I turned it on my website went offline with this note “The site is experiencing technical difficulties.”
Any ideas why this would happen?
Not too sure what could be the cause, but I have experienced this warning once on a local test site and it turned out to be a plugin that needed updating.
Cheers!
Lyle