Category : WordPress

Simple fix for WordPress “The response is not a valid JSON response” error

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 »

Why WordPress Page Builders Suck

n the context of WordPress, page builders are plugins (add-ons) that provide an alternative interface for creating and laying out web pages. Page builders are primarily aimed at DIYers who want to build their own websites but don’t have the HTML & CSS coding skills to create web page layouts with raw code. I have concluded that page builders are not a good solution for me or my clients. In this article I discuss six reasons why page builders are problematic.

Read this »

My Top 8 WordPress Advances in the last 12 years

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 »

Is WordPress any good?

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 »

Solution to WordPress adding br and p tags around shortcodes

The Problem:

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.

The Solution:

  1. Change the execution priority of wpautop so that it executes after the shotcodes are processed instead of before. Add this in your functions.php file:

    remove_filter( 'the_content', 'wpautop' );
    add_filter( 'the_content', 'wpautop' , 12);

  2. 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');

Which content management system? Why it’s important

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:

  • Open source CMS
  • Proprietary commercial CMS
  • In-house custom developed CMS

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:

  • more likely to be an evolved stable platform
  • often more refined usability – i.e. easier to use
  • usually will have a much wider range of features/capabilities
  • easy to find another developer who can work on your website (so you are not locked in to the original developer for future work on your website)
  • typically well optimised for search engines
  • portable to a wide range of web hosting environments
  • generally will cost less because many specific features that you need are already built in or available as plugins/modules and the wide range of options for choosing a developer
  • no additional fee for the CMS software itself

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.

WordPress Plugin Released – Flexi Quote Rotator

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.

Our content management system of choice

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:

  • Easy to use – the administration interface is logical and intuitive. Even a person with very limited computer skills will have no problem using WordPress to update and manage a web site.
  • Search engine friendly – WordPress provides the tools and features that can be used to build a web site that is well optimised for search engines
  • Powerful extendible platform – WordPress is designed to be customised and extended by means of building ‘plug-in’ components that can add functionality to cater for the specific needs of a particular web site
  • A mature stable platform – WordPress has undergone more than 5 years of active development with new and improved versions being released on a regular basis
  • Large active developer community – Many developers create and make available plugins that add new features to the platform so for many special web site requirements, chances are that a plugin has already been created to handle it
  • Full flexibility of design and layout of web site – WordPress has a very flexible templating system that allows the web developer complete freedom in designing the web site.
© 2020 Stellar Web Works Ltd.