Archive widget not working in WordPress self hosted

One of WordPress best features is it’s flexibility. You can completely change the look at the feel of the visitors experience, and the authors experience. You can use it as a blog, a static site or even run a forum using it.

One of the problems this creates though is trouble shooting issues as and when they arise. It could be down to any number of unrelated issues- a theme issue, a widget, plugin or even a WordPress bug.

One that I came across today involved the “archive” widget that a lot of people place in their sidebar. By default it should give access to a monthly archive of posts, dating back to the day you started your blog. Only on my blog it didn’t work.

I checked the widget, it seemed to be set up correctly. I checked options in the theme, nothing there.

A bit of hunting around showed it was actually a default setting in YOAST (an SEO optimisation plugin for WordPress) that was the culprit.

By default YOAST disables archives by date and archives by author in order to stop blog posts appearing a duplicated content (something which will adversely affect SEO) when they appear as archived posts. The setting to my mind is rather aggressive as there is also the option to add a “no index” instruction to the archive, which in the majority of cases will solve the problem before it even happens.

To sort the problem, click on the SEO button on your dashboard and select archive:


Then, scroll it down a bit and untick the Disable the date-based archives checkbox and the Disable the author archives checkbox, while making sure that the Add noindex, follow to the date/author-based archives box is ticked:

what to alter

Your archive should now work properly.

This entry was posted in Technology. Bookmark the permalink.