Reply To: Previous / Next Post

Tim Neumann

I think to say it is “nonsense” is a bit insulting. I don’t think you understand the possibilities here. It is not “like looking into the future”, though I can understand your confusion in regards to what I am asking.

Whether you are looking backward or forwards is relative to the position you are in at the moment…let’s say I have the following posts:

01/01/2019 12:00
01/02/2019 12:00
01/03/2019 12:00
01/04/2019 12:00
01/05/2019 12:00
01/06/2019 12:00

And my current post being viewed is:

01/03/2018 12:00

Then 01/02/2019 12:00 would be the previous post and 01/04/2019 12:00 would be my next post, depending upon date order. Essentially you are looking both backward and forward in the array of returned posts, relative to the position of the post that is currently being displayed. I have made the time portion of each post 12:00 for simplicity of explanation, but the same situation would work in the case of multiple posts made on the same date, they would still be ordered correctly and you could easily interrogate the array in either direction.

From an architectural perspective, it really comes down to the communication capability between the post display and a widget (in this case yours…). I am unclear as to whether or not such data can be passed back and forth in WordPress.

Food for thought…and at the same time, I will grant you that I may not understand the communications barriers between elements that make up a post.

  • This reply was modified 1 year, 11 months ago by Tim Neumann.