Quote of the day

Description: show random quote every day.

#1. First, you can add a Text Block with a random text

V2 361 26 1 resized 1755076181 min

#2. Next, find ID of Text Block

V2 361 26 2 resized 1755076182 min

#3. Next, use this code to Code Injection > Footer

<script>
const textList = [
  "God help us, we're in the hands of engineers. Just my luck, no ice. God help us, we're in the hands of engineers.",
  "Life finds a way. Must go faster. God creates dinosaurs. God destroys dinosaurs. God creates Man.",
  "You really think you can fly that thing? My dad once told me, laugh and the world laughs with you.",
  "This thing comes fully loaded. AM/FM radio, reclining bucket seats, and... power windows.",
  "Be clear, be confident and don't overthink it. The beauty of your story is that it's going to continue to evolve.",
  "Don't worry about sounding professional. Sound like you. There are over 1.5 billion websites out there.",
  "It all begins with an idea. Maybe you want to launch a business. Maybe you want to turn a hobby into something more.",
  "What do they got in there? King Kong? Is this my espresso machine? How did you get my espresso machine?",
  "Life finds a way. What do they got in there? King Kong? Is this my espresso machine?",
  "Must go faster. God creates dinosaurs. God destroys dinosaurs. God creates Man. Man destroys God.",
  "Did he just throw my cat out of the window? You really think you can fly that thing?",
  "The beauty of your story is that it's going to continue to evolve and your site can evolve with it.",
  "Whatever it is, the way you tell your story online can make all the difference.",
  "If you read the words back and don't hear your own voice in your head, that's a good sign.",
  "Your goal should be to make it feel right for right now. Later will take care of itself."
];

function getDailyText() {
  const today = new Date();
  const dayOfYear = Math.floor((today - new Date(today.getFullYear(), 0, 0)) / (1000 * 60 * 60 * 24));
  const index = dayOfYear % textList.length;
  return textList[index];
}

function updateDailyText() {
  const textElement = document.querySelector('#block-yui_3_17_2_1_1755069776278_26541 .sqs-html-content p');
  if (textElement) {
    textElement.textContent = getDailyText();
  }
}

document.addEventListener('DOMContentLoaded', updateDailyText);
</script>

V2 361 26 3 resized 1755076182 min

#4. Remember to update Text + Text Block ID

V2 361 26 4 resized 1755076182 min

Buy me a coffee