Chunks of Useful Code

News

Enhancing a WordPress Site without Code

By on Jul 13, 2017 in News | 0 comments

TwentySeventeen has been a hugely successful and adopted theme for WordPress blogs and sites. And that certainly has to do with it’s customiser options, including the ability to set static homepage areas. In doing so, you can unwittingly remove some very useful features from your users. For example on my personal blog I have set a static homepage up, that has the “2 column” width, with recent blog posts being listed underneath. Whilst I really like this layout, it does means that I have lost the standard sidebar, and along with it some useful widgets, such as a search option. In the video below I demonstrate how I can re-add these features in, using Widgets on Pages. I also show how I can use the new “Auto Insert” feature of the Pro version to include certain widgets at the end of each blog post.   Video Transcript In this video we’re going to enhance our 2017 themed WordPress blog, with a few widgets and plugins… with a secondary aim of not having to touch any code. This will give our site extra functionality, useful to the user, but also provides hooks to try and increase the time the user spends on our site. I’ll be using my own site toddhalfpenny.com as a demo, and you can see a quick demo here. I have used the customizer to set a static front page, and then also used the next content part to list my recent blog posts. Since I have done this I’ve lost my sidebar, but I want to include some functionality that sidebars give me, namely widgets. Functionality I’d like includes “search“ and maybe a link to a featured / stick post. Another feature I’d like to add is some hooks at the end of each blog post to try to engage with the user, in my case I’m wanting to add “featured / sticky posts” links. For me to achieve what I want, without having to code anything, I’m going to add a couple of plugins to my site. Firstly a “posts-in-sidebar” which will enable us to create widgets for our sticky posts. This is a 5 star plugin with a 10 active installs… though it does not...

Read More

Widgets on Pages v1.2 – Auto Add Widgets to Posts

By on Jul 12, 2017 in News | 0 comments

That’s right folks. v1.2 of Widgets on Pages Pro is here, with the shiny new addition of being able to select “Auto Insert” options for Turbo Sidebars, to automatically add sidebars and widgets to posts and pages. The plugin enables you to append widgets to WordPress posts and pages, with the option to either have the widgets displayed before, or after, the post or page content. You can specify whether the widgets should automatically be inserted into Posts, Pages, or both, and a new meta-box appears on the individual post/page editing screen to allow you to disable the auto-inclusion on a per content basis. This new feature is perfect for adding hooks into your site, for your users. Examples include adding a “recent post” listing to the base of posts, adding a newsletter sign-up to the end of pages, or even adding a notice box to the top of all content highlighting some important temporary information (e.g. Emergency closing hours of your shop, or a security update for your online...

Read More

Making the most of WordPress 4.8 Widgets

By on Jun 11, 2017 in News | 0 comments

With WordPress 4.8 “Evans“, we welcome 3 new Widgets into the core WordPress offering, along with an update to the basic Text Widget. Here’s a quick demo of how the Widgets look, using the Widgets on Pages plugin to display them in this post. Updated Text Widget Some content using the new text widget. And a link. And some bullets An Image WidgetA PlantUML generated imageAn Audio Widget https://datamad.co.uk/wp-content/uploads/2017/03/Pim-Poy.wavVideo Widget https://www.youtube.com/watch?v=w2LfCihCqRI We can see here a Text Widget, that has been populated with it’s new visual editor. In the example above I’ve used it to add formatted text, along with a hyperlink. I’ve also used the new Audio Widget to embed a nice audio player. In the example above I’ve populated it with a .wav file that I’d uploaded, but it could also support files linked by URL. The new Video Widget also gives me a nice inline player, and again can be populated from the media library but also from URLs like in the case above where I have referenced a YouTube link. The last widget I’ve used above is the new Image Widget. Power to the Casual Users All-in, these 3 new widgets, and the updated editing experience of the Text Widget, have given a lot of power to casual WordPress users. For a long time authors and site owners have had to “hack” the plain text widget, and use extra plugins to achieve things as simple as adding rich text to their...

Read More

Widgets on Pages v1 Release

By on Apr 29, 2017 in News, Plugins | 0 comments

Well, it was 7 years in the making, but Widgets on Pages has finally made v1 release. Widgets on Pages is the highest rated way to add WordPress widgets and sidebars into both pages and posts, as well as supporting an easy way to add more dynamic sidebars that can be used throughout themes. After some years of very little change I have re-architected the plugin to make use of a more standard Object Oriented structure (based upon the wonderful WordPress Pluign Boilerplate project). This v1 release also moves towards using WordPress custom post types, as storage places for each dynamic sidebar created by the plugin. Although the plugin was untouched for quite some time I did keep an eye on making sure that it was compatible with each WordPress release, and even though I didn’t make any updates it still kept bringing in the 5 star review… so thanks to you all, and the stability of the WordPress internals. It wasn’t all plain sailing As some of you will have seen, the initial bump to version 1.x did indeed land with a bump. I cannot apologise enough. It seems that everyday is a school day… and even though I believed I had thoroughly tested the upgrade from pre v1.X installs I hadn’t. It isn’t a pleasant feeling seeing upgrade issues when you have an active user base of upwards of 70,000 It turns out that my understanding of plugin updates through the WordPress.org repo doesn’t work as I thought it did. I managed to reduce the number of users that were impacted, and, thanks to the effort of users posting to the support forum, I was able to debug what was up and get some quick fixes in and rollback the stable version. I can tell you now that it isn’t a pleasant feeling see upgrade issues when you have an active user base of upwards of 70,000. If you are interested then this article covers how plugin updates are handled. Onwards… onwards The updated structure and use of CPT was put in place to allow an easier route to delivering some more of the items on the roadmap for Widgets on Pages… and I hope that you...

Read More