How to create WordPress Block Patterns and Block Templates

In this article I will show you how quick and easy it is to set up your page/post layouts with block patterns and block templates. Let’s start with block patterns.
Read this »In this article I will show you how quick and easy it is to set up your page/post layouts with block patterns and block templates. Let’s start with block patterns.
Read this »On a new WordPress site that I was working on I got an error message “The response is not a valid JSON response.” when I attempted to upload an image to a page via Gutenberg block editor.
After Googling it, I found a myriad of different solutions and troubleshooting steps to take but in the back of my mind I remembered encountering this before and remembered that it was a simple fix. One solution suggested using the Media Library upload button instead of the direct Upload button. This did actually did allow me to upload the image but when I went to save the page I got the error “Updating failed. Error message: The response is not a valid JSON response.”
Read more »In the context of WordPress, page builders are add-ons that provide an alternative interface for creating and laying out web pages. I have concluded that page builders are not a good solution for me or my clients. Here I discuss why.
Read this »I started building websites with WordPress in 2007. Since then WordPress has been my content management system of choice. Over the years I’ve witnessed a lot of great advances in WordPress. But even back 12 years ago WordPress was a great platform for building websites. I found that I was always able to customise or hack it to achieve what I wanted. For example, WordPress didn’t have navigation menu management features built in. But I was able to write a simple plugin that converted the Blogroll Links Manager feature into a navigation menu manager.
In the last 12 years I’ve witnessed the evolution of WordPress from a blogging-centric system that could be adapted to work as a basic CMS into a full-blown CMS and even a web application framework. Here are some of my favourite WordPress advances:
Read more »Ok, first things, first, who am I to write a review of WordPress? Well, I’m an independent web designer/developer who lives in the small city (pop 50,000ish) of Nelson in New Zealand. I mostly build websites for small local businesses in the Nelson region, sometimes for businesses in other parts of New Zealand and occasionally for clients in Australia, USA and Europe. I’ve been working in this area (small business websites), since 2007 – about a dozen years. I’ve worked with a handful of popular content management systems over the years – Drupal, Joomla, Silverstripe, a funky Apple OS X based one called Manila, some e-commerce specific systems – Magento and Prestashop. I’ve also encountered and worked on a few websites (just a few!) built outside of content management systems – static HTML/CSS, ASP (the old pre-dot Net Active Server Pages), JSP, PHP and, God forbid, even Dreamweaver! But WordPress has been may mainstay since I researched and trialed content management systems back in 2007 and picked WordPress as the CMS that I would focus on.
Read more »Sometimes I find stray p or br tags appearing inside a block of content that I’ve enclosed in shortcodes and this can mess up the layout by adding extra spacing where I don’t want it. It occurs because of the default order in which WordPress processes your content – wpautop (the function which converts line breaks to p or br tags) is run before the shortcodes are processed.
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 12);
Now there will be no extra p or br tags added inside your shortcode block. In fact there will not be any automatic conversion of line breaks to p and/or br tags at all. So if you want the legitimate line breaks to convert to p and br tags, you will need to run wpautop from inside your shortcode function, e.g.:
function bio_shortcode($atts, $content = null) {
$content = wpautop(trim($content));
return '<div class="bio">' . $content . '</div>';
}
add_shortcode('bio', 'bio_shortcode');
I was recently having a beer and a chat with a fellow Nelson web developer and discovered that we shared the same favourite content management system. That got us on to talking about what CMSs the other local web design companies here in Nelson build their websites on. My mate told me of a job he turned down because it was an existing website that was built on a content management developed in-house by the original developer of the website and quick look at the structure of the code showed that it was a complicated mess that he didn’t want to get involved with. This reminded me of how important the choice of CMS platform is. Yet very few of my clients have ever asked me about what type of CMS I would use to build their website on. I guess most people are not aware that there is a choice to be made.
For the uninitiated, a content management system is the administration side of a website that facilitates the management, updating and expansion of the website. There are a vast amount of different systems out there, a handful of widely used ones and there are some web companies that custom build their own systems. Broadly speaking they can be categorised as:
While there may be some excellent proprietary and custom developed systems in use, open source content management systems are the most widely used and as a result generally lead the way in terms of ‘state-of-the-art’ in features, usability and security. There are a few top open source CMS platforms in particular that are highly active projects in terms of the pace of continual development, improvement and enhancement. Such systems run millions of web sites and on such a scale that any problems are quickly discovered and fixed. Whereas if you compare a custom developed system, it is unlikely to find a pace of development and improvement that comes anywhere close and it is also unlikely for find the same level of available features and capabilities as you would in a top open source platform.
Advantages of Open Source CMS over proprietary or custom built:
Of course within open source there are many different systems available but three of the most widely used are WordPress, Joomal and Drupal. Each of these three are well refined systems with a large community of developers and are continuously improving and evolving at a rapid pace. They each have their own particular strengths and are all great solutions for different situations. There are also a number of other widely used and respected CMSs out there. The bottom line, if you are someone looking to get a website built, is to ask your prospective web developer what CMS they would use for your web site and why. If they propose a custom built or proprietary system, ask why they consider it to be a better fit for your situation than an open source system and compare the advantages they provide with the advantages of open source systems outlined here.
I have made available another plugin for WordPress. It is a plugin that adds a template tag for creating a navigation menu from links added to the core WordPress links management facility. For more information about this plugin visit the EZY Nav Menu plugin page on this site or see the WordPress Plugin Directory.
I have made a WordPress plugin for displaying quotes, testimonials or other text snippets on a WordPress website/blog available for download on this website. In the past I have modified many plugins for my own purposes, but this is my first foray into releasing a WordPress plugin for public consumption. I had been looking for a plugin that would display testimonials on a client’s web site and came across Luke Howel’s quote rotator plugin. Luke’s plugin displays the quotes as a sidebar widget which was not suitable for my needs so I decided to have a go at expanding upon his plugin to offer other display options as well as add a settings admin menu and some styling features. The result is the Flexi Quote Rotator plugin. As with the original version that it is based on, it is licensed under GPL and free to download, use, modify, redistribute as you please.
A content management system (abbreviated CMS) allows non-technical people to update and manage a web site without requiring technical knowledge.
At Stellar Web Works we specialise in building web sites on content management systems. We have worked with a number of different content management systems and have come to favour using the popular WordPress platform as our CMS of choice. WordPress is well known as the most widely used blogging platform but what is less well known that it is also an excellent general purpose content management system that makes a great platform for building a wide variety of web sites. WordPress, built with the PHP programming language and MySQL database platform, is very extensible and can be customised to add any special functionality and features that a web site might require. Here are some of the reasons why we think WordPress is a great choice for a CMS: