Category Archives: Wordpress

Why WordPress 5.5 broke your site & how to fix it

Enable jQuery Helper plugin

So you updated to WordPress 5.5 and either your site stopped functioning correctly or a plugin stopped working. Read on for the likely fix.

The problem

The solution that worked for me was also the easiest solution you can imagine. It takes less than a minute to get your site working correctly again. First off, the likely problem with your site has to do with jQuery a JavaScript library that a number of plugins and themes use. In short, WordPress 5.5 removed older jQuery scripts in order to modernize itself. This means that a whole raft of themes and plugins need to be updated by their respective authors. In the meantime, this has left thousands if not tens of thousands of websites broken or partially broken.

The solution

The fix is easy and fast. Follow these steps:

Step 1) Download, install, and activate ‘Enable jQuery Migrate Helper‘.

Step 2) There is no step 2. Your site probably works now.

The Conclusion

If your site is still not working, then it means your problems are likely not jQuery related and I wish you the best in sorting that out. If it did fix your problem then that is because WordPress 5.5 affected thousands of plugins and themes that relied on old JavaScript functions and this plugin provides those deprecated functions. While this is a fix, remember that the affected plugins and themes will hopefully provide updates to solve the issue. That is, they will use modern JavaScript functions instead. If updates on themes or plugins that stopped working for you come through, disable the ‘Enable jQuery Migrate Helper’ plugin to see if the problem is solved. If the problem remains, simply reactivate the plugin.

Styling the WordPress admin interface

wordpress_admin

Wouldn’t it be great if you could style the WordPress admin interface. Well you can and it is easy. In my case, a customer wanted me to remove a link in the User area of the CMS because it became redundant after I installed a user moderation plugin. It annoyed the client that the ‘Pending’ link was still visible in the User area because that link didn’t work anymore as the new plugin overtook that function. The link was placed in a real obvious spot and they kept clicking it when they wanted to moderate users instead of clicking the new link which the plugin placed elsewhere. They asked me if I could remove the link it and in the process I found a way to add in a style sheet for the Admin area which is useful for any kind of styling you may wish to implement.

Create a CSS file

The CSS code I used was as follows. Of course you can add whatever you want.

li.registered {display:none;}

Update your theme’s function file

Here is the code I put in to the function file to implement the new style sheet.

/* CSS in the CMS */
function admin_style() {
wp_enqueue_style('admin-styles', get_stylesheet_directory_uri().'/admin.css');
}
add_action('admin_enqueue_scripts', 'admin_style');

If you don’t use a Child Theme, (you should), then use the following code instead.

function admin_style() { wp_enqueue_style('admin-styles', get_template_directory_uri().'/admin.css'); } add_action('admin_enqueue_scripts', 'admin_style');
}

Now place the CSS file which I called admin.css in your active theme’s root folder. It will be something like: /wp-content/themes/twentynineteen.

Done