Widgets creates (no title)/404 error link in recent posts

I’ve working on a project and been trying to adapt the Starter Theme 2.

The links in the Right Sidebar Recent Links section aren’t working properly on all pages. On Category pages I get a link “(no title)” that clicks to a page not found 404 error page.

image
I’ve tracked the odd behavior to widgets enabled within the theme customizer.

e.g. http://staging.criverwatch.org/category/main-article-archive/

This code was one post entry in the wp_posts mysql table:

{
    "st2-reboot::show_right_sidebar": {
        "value": true,
        "type": "theme_mod",
        "user_id": 5688,
        "date_modified_gmt": "2020-08-07 03:20:54"
    }
}

The widget only show those broken links on Category pages, as far as can tell. It works properly on the home page, individual posts, and author pages.
Shared with Zight
e.g. Page not found – California River Watch

Can anyone suggest ways to correct this or help me figure out how to track down the odd Recent Pages link behavior?

With some coding or the use of specific plugins, it is possible to achieve the display of recent entries for a specific category. By default, the recent posts standard widget is not suitable for the task.

You can read more from:


In the mean time, you can use widget logic plugin and set your widget to !is_category() && !is_tag() to prevent the faulty display on categories & tags templates.

Thanks Emmanuel!

That’s a possible workaround. It’s sort of how I displayed only one category on the homepage. I hadn’t considered it could be applied to widgets. I figured I’d added something that was changing the action I intended and needed to fix the theme.

I’m still curious to my why I’m getting two different lists of links from the same widget depending on which page section is displayed. At least I don’t feel like the issue will put a stop to my project now.