Posts relating to

Screenshot of commenting ordering

Ordering nested comments by the latest reply

I’ve recently been working on a project that has pretty active comment threads. To improve the user experience we decided it would be much clearer to show the newest activity at the top of the comments. Now, you may be thinking that WordPress has a setting for that? It does not. Via WordPress, you can […]

Remove MetaBoxes form Specific Pages

Here is a very simple and robust way to remove the meta boxes from specific pages. It will remove the specified meta boxes from any page slugs in the array of slugs. Code to Remove Metaboxes from Specific Pages add_action(‘do_meta_boxes’, function() { $post_id = $_GET[‘post’] ?? ($_POST ?? false); global $edit_post_id; // just call it […]

Set Writing Settings to use Classic Editor only

Using Gutenberg and/or the Classic Editor

It’s common knowledge that WordPress’s new editor, codenamed Gutenberg, will shake up the landscape for many, many websites that use the awesome platform. For some of us it’s a welcomed step for WP, however, for others, it is not. Yet. For Web agencies and freelance developers this is just a hurdle (albeit a potentially big […]

Adding a Gutenberg block

Getting your plugins ready for Gutenberg

Is your site, its plugins, custom post types, custom meta and your content ready for Gutenberg? Remember the release date: 5th 6th 7th December 2018. TL;DR Until you’ve tested everything, a short-term fix could be to turn off the Gutenberg experience: add_filter(‘use_block_editor_for_post’, ‘__return_false’); If you own, manage, develop or have any vested interest in a […]

Custom links only in menu meta box

Remove menu link types from the WordPress menu options screen

On a client site, we wanted to restrict menu items to Custom Links, only. Thus remove all other menu types. The main drive behind this was to improve the user experience and reduce confusion, as the menu is only for Social Links. With a brief search yielding very little I set about coding a solution, […]

Overflowing text on mobile device

How to break long words using CSS @supports

Recently, I had an odd scenario where wrapping long text needed either word-wrap, overflow-wrap or word-break to achieve the same overflow pattern across different browsers. To arrive at a suitable solution I opted to use @supports to maintain control of the declarations. What is @supports? @supports is a feature query, whose associated block of statments […]

Conditionally enqueue scripts and stylesheets on specific pages

There are many use-cases where scripts and stylesheets only need to be loaded on certain pages. One such example would be to only load the JavaScript and CSS stylesheets for Contact Form 7 (a lightweight contact form plugin) on the contact page. This article will demonstrate how to conditionally load the JS and CSS for […]