Taxonomy term page going to 404

Following @CraigWayne’s suggestion to use Query Monitor… Message: “Use of undefined constant term_name – assumed ‘term_name’”. Count: 1. Location: wp-content/themes/elegant/taxonomy-source.php:38. Caller: wp-includes/template-loader.php wp-includes/template-loader.php:74. Component: Core. >>>>> Line 38 in taxonomy-source.php included “” it was objecting to term_name in my taxonomy-source theme file; I changed it to $term = get_queried_object(); followed by name; ?> The takeaway … Read more

Custom rewrite to fetch feed data

Seems like a good candidate for add_rewrite_endpoint(). add_rewrite_endpoint( ‘items’, EP_ROOT, ‘item_id’ ); That will register the endpoint /items/<item ID> and also registers the query var item_id, and eliminates the 404 status header/title as well. But the page title would be the site name and you’d probably still want to hook to pre_get_document_title to customize the … Read more

Page not found – Wamp green, phpmyadmin working

My first step would be to turn on WP_DEBUG in your wp-config.php file. Edit wp-config.php and add the following lines: define( ‘WP_DEBUG’, true ); Then visit your site’s admin (example.com/wp-admin) and see if an error appears. More than likely the plugin you just added broke the site, so you can go into your local filesystem … Read more

wp-json Returns 404 Upon Plugin Activation

I found the solution and will post here on the off-chance it helps someone in the future. The bottom line is there was a typo in a function that responded to POST requests. I narrowed it down to one file by disabling portions of my plugin in the activation class. By doing this I determined … Read more

Problems with Page Not Found

So yes, the key point here is that you should put the WordPress-specific 404 template file in the theme directory (e.g. wp-content/themes/your-theme/404.php) and not in the root WordPress directory. And despite that you already got the solution, I thought you would still want an answer to the following? I would like to figure out what … Read more