How can I add a daily changing quote to my website?

Hello!!

I would love to add a quote of the day section on my website. So each day, the quote would change. Is there any app like this, or how would I go about coding something like this?

I have searched everywhere with no luck,

Thank you!

Hello,
There are some free and paid quote APIs. Check this link below
https://zenquotes.io/
They provide free API and documentation.
https://premium.zenquotes.io/zenquotes-documentation/

Below are some endpoints,

https://zenquotes.io/api/today - Generate the quote of the day on each request

https://zenquotes.io/api/random - Generate a random quote on each request

You can create a node like this wherever you want to display a quote.

 FALLBACK QUOTE

add a js call like this and change innerHTML of above div using identifier.


After you can do styling with css.

Hope it helps.

Hey!

I want to generate my own quotes, and I would like them to change every 24 hours, is this even possible?

Hey,

If you want to generate your own quotes. You need to write the whole thing from scratch, make the quote library as a JSON object and iterate through quotes based on the day of the year or something like that.

Another easy way would be to create a metafield or theme option text field and manually update the quote of the day periodically.