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?