With the release of WordPress 5.0 in early December 2018 web developers were forced to make a decision, install the Classic Editor plugin and continue to enjoy the post editor we’ve used for years or jump the new block editor experience. However, I quickly found a few of my themes were not ready.
Category: WordPress
Disable URL Guessing in WordPress
Placing the following PHP code snippet below in your theme’s funtions.php file will disable a WordPress feature that attempts to automatically redirect a bad url to an actual post or page with a similar url.
Please note, if there are any broken links to your website or it’s pages that benefit from this feature it will now lead to a standard 404 error page.
/* Disable URL guessing - https://www.bloggersignal.com/stop-wordpress-from-guessing-urls */
add_filter('redirect_canonical', 'pz_no_redirect_404');
function pz_no_redirect_404($redirect_url)
{
if (is_404()) {
return false;
}
return $redirect_url;
}
The above was found in a post at https://www.bloggersignal.com/stop-wordpress-from-guessing-urls
Retrofitting an old theme for Gutenberg
Once you start to understand the workflow behind Gutenberg’s tagging convention things start to come together.