Elementor

Elementor + Astra Pro – Daily Banner Above Header

Get the latest from
Sniffle Valve

Sniffle Valve

Consider buying Sniffle Valve a coffee  

Book a one-on-one online training session

Note: To copy any code presented in these tutorials, hover over the code and select the Toggle RAW Code icon raw code icon

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;
    
}
?>

 

4 thoughts on “Elementor + Astra Pro – Daily Banner Above Header”

  1. Avatar

    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?

    1. Avatar

      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

Leave a Comment

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

Scroll to Top