Answer the question
In order to leave comments, you need to log in
How to track post order in wordpress?
Site on wordpress. There are 2 entries, let's call them 1 and 2. Both entries are exactly the same, except that they have different counters.
Let's say that in the current week you need to show record 1 on the site (the counter changes according to certain conditions), in the second record the counter is 0. The next week you need to show the second record and there the counter should be twisted, and on the first record you need to reset it. And so on in the third week, we reset the second and show the first record.
Tell me how to implement such an alternation of weeks from which to dance for output and, accordingly, what condition to make and how to run a task on the server to reset the counter?
Answer the question
In order to leave comments, you need to log in
There is an assumption that you have not quite correctly thought out the architecture, but without a normal description of the essence of the task, it is difficult to speak more precisely. In essence:
1. 2 identical records are not needed, just one is enough, and you can already bind the counter (s) to it
2. The counter can also be one, but its states, alternations and other data should be stored separately
3. Counter change / zeroing and data update is hung up on cron
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question