Hi,
I need to have an ‘infinte’ Next and Previous buttons to show posts on single posts. I came to this solution: https://theme.co/apex/forum/t/need-the-next-and-previous-arrow-buttons-to-show-posts-from-the-parent-category-page/23944 and it works fine, however, the following buttons came out empty:
- the first (latest) single post, the ‘Previous’ button came out empty
- the last (oldest) single post, the ‘Next’ button came out empty
I wanted to show links to post replacing the empty ones with:
- On the first (latest) single post, the ‘Previous’ button displays and links the oldest post
- On the last (oldest) single post, the ‘Next’ button displays and links the latest post
This would render the ‘Next’ and ‘Previous’ buttons infinite.
Looking from the provided solution above and looking for answers on the internet, I think it will need to have conditions similar to if(!empty($))
, I’m not sure and I don’t know how to do it.
Can you help me with this please?
Thank you so much!