Posts relating to
Many plugins (and themes) inject HTML comments into the page’s source code that aren’t really needed in your a live site. Here’s how to remove them.
Recently, I’ve had a couple of projects that require thumbnails for video posts. There are plugins out there to do this, but I wanted a simple, lightweight way. Good news is, this can be achieved very easily by making use of WordPress’s WP_Embed class. /** * Maybe get thumbnail from embed * * @param string […]
Sometimes you only want WordPress meta boxes, such as the permalink, on specific pages. To do so you can remove meta boxes from certain pages.
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, […]
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 […]
Schema markup helps search engines understand your content by describing its primary purpose, in a machine-friendly way. The most recent, and in my opinion, the easiest to maintain, is ld+json, which is contained in a script tag, proving the search engines with the key data. What does ld+json markup look like? The best way to […]
Processing styling rules based on certain criteria, such as viewport width, is achieved using the @media conditional group rules. As of October 2018, all modern browsers support nested @media queries. What’s a @media query? Here’s a simple example of a media query to make the text 10% bigger on devices with a screen (viewport) wider than 768px […]
The WordPress RSS feed is great. We use it with third-party services, such as MailChimp. One key datum that isn’t included in the feeds by default is the featured image for posts (and pages). This article will address that with a simple ‘action‘ hook that adds the featured image to the item’s feed. /** * […]