Display two different pages based on date

Hello I would like to have a button in my menu bar take you to a certain page M-F of every week and then the same button take you to a different page Saturday and Sunday. I am new with liquid code and html but understand it well enough to code it myself, just need some guidance and ideas on how to go about this.

Any help would be welcome Thank you!

Hi @BB_Tech ,

I just sent you a DM. Looking forward to continuing our conversation. :handshake:

Best,

Glauber Magalhães

Just put whatever HTML code you want for weekday in the weekday section and wekened section.

{% assign weekday = "Mon,Tue,Wed,Thu,Fri" | split: "," %}
{% assign weekend = "Sun,Sat" | split: "," %}
{% assign c_date = "now" | date: "%a" %}
 {% if weekday contains c_date %}
	Weekday Button HTML
  {% elsif weekend contains c_date %}
	Weekend Button HTML
 {% endif %}

Thanks Dog, That Works Great

Thanks. You can always mark the solution. This way other people can find it easier in the future.

Hey @BB_Tech , I’m curious why you need this functionality? Is it because you want the images, messaging, etc. to be different from M-F and S-S?

I may have a way more sophisticated solution for you, if that is what you’re after. Super interesting stuff :slightly_smiling_face: