How to implement the script

Started by jessepeterson, Aug 23, 2022, 01:10 AM

Previous topic - Next topic

jessepetersonTopic starter

I need a script that will look at the current date and display information from the database to the website from the string attached to this date (I hope it's clear). Those. there are only 365 records in the database and every day a new one should be displayed on the website depending on the date.
For example the script will look at date("N"); and, depending on the number, display info from a certain table row in the database.
  •  

autorenta

generally, you can do it without a database. Stuff 365 lines of text into a text document. The line number is the number of the day.
We check the annual number of the day, pull from the text document a line of text that equals the number of the day. And take it out where needed. You can simply include the script in the right place in your WordPress theme.
  •