hints, tips, tricks and news

How to call wp_get_attachment_image() without srcset

Sometimes it’s nice to have all the goodies wrapped up in a nice little function, such as wp_get_attachment_image(). This is a great function that generates the entire html for an image tag, including srcset and sizes. However, wouldn’t it be great if sometimes we could get all the goodness from this wonderful function, but just […]

A simple filter to hide specific widgets on specific pages

It’s not uncommon to only want to show specific sidebar widgets or footer widgets in certain views. In the case below we didn’t want to show a client’s teaser widget of their recent installations when the visitor was already viewing any of their portfolio pages. So here’s a simple filter that does just that: /** […]

How to disable directory views with a blank file or a single line of code

By default the directories (folders) of your website and other applications may be publicly viewable for all to browse. This is a potential security risk, but thankfully one that can be reduced very easily. Here are two simple options to reduce this risk by preventing the directories from showing their content as browsable lists: Option […]

Demote Yoast’s meta box priority to ‘low’

The Yoast meta box sits just below the main editor. To demote it, aka, reduce its priority, just add this anonymous function to your theme (or better still, a custom plugin): add_filter( 'wpseo_metabox_prio', '__return_false' ); Or, you can use the more commonly quoted approach of explicitly stating the meta box’s positional priority to ‘low’: add_filter( […]

Mobile-friendly websites are a must

If you value your website’s search engine positioning then mobile-friendly websites are no longer a nice-to-have. On April 21st, 2015 Google’s mobile-friendly websites algorithm was updated to have a significant impact on search results! Since this algorithm was implemented it’s strongly believed that websites not ticking the right boxes for Google’s mobile support best practices […]

We are securely encrypted. And you should be, too

This site is delivered over https, using modern encryption methods. We advise you to do the same and get encrypted. It’s no secret that your bits can be seen by Peeping Toms when you surf the web. To be more precise, the bits are the streams of data between your device and the source of […]