I generate archives using wp_get_archives() and get list of all my archives.
But when I click one of the links its always redirect me to front-page.php which is www.mydomainexample.com.
I’ve created an archive.php file in my directory in case you are wondering. I also saved changes for permalinks.
In my case I want to redirect to year/date. The links that wp_get_archives() generate already what I’m looking for www.mydomainexample.com/2020/12 but it always redirect to my homepage www.mydomainexample.com.
What am I missing?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Sorry, this is on me. My SEO plugin by default disable the archives date and redirect to homepage.
Leave it on here for the people maybe get stumbled by this problem.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0