Gutenberg Presentation

An Introduction to Gutenberg

Wednesday, Apr 11, 2018, 6:00 PM

Vernon Library
2800 – 30th Ave Vernon, BC

23 WordPress Enthusiasts Went

Gutenberg will be replacing the text editor on your WordPress website, prepare yourself! Learn all about WordPress’s upcoming editor. In this meetup we’ll cover: – the reasons for Gutenberg’s creation – it’s ease of use and the problems it solves – the current and future state of themes in relation to Gutenberg – a sneak peak at what plugins will s…

Check out this Meetup →

Gutenberg will be replacing the text editor on your WordPress website, prepare yourself!

Learn all about WordPress’s upcoming editor. In this meetup we’ll cover:

  • the reasons for Gutenberg’s creation
  • it’s ease of use and the problems it solves
  • the current and future state of themes in relation to Gutenberg
  • a sneak peak at what plugins will soon look like in Gutenberg
  • what this all means for your WordPress site
  • what this all means for the future of WordPress
  • how Gutenberg will become a full fledged Page Builder
  • developers: overview of logic, plus tips & tools for writing blocks

Not required but feel free to bring along your laptop, there’s hands on tools to test out Gutenberg (without having to install Gutenberg on your site [but we’ll cover that too])

Followed by an open Q&A about anything and everything WordPress.

Update: slides https://io.davidsword.ca/201804_gutenberg_presentation.pdf

Check If Current Page Uses Gutenberg or Classic Editor

If you’re themes like most themes, and you have to fix your main elements CSS to accommodate Gutenbergs edge-to-edge capabilities on gutenberg-only pages, it’s good to know which pages are actually using Gutenberg. The follow will add a CSS body class for Gutenberg pages.

Add conditions like !is_home(), get_post_type() != 'post', etc., to accommodate your theme setup.

On Img Upload, Create New Post, Set as Featured Img

I used to manually do everything for the Images section of my site. Adding an image would involve: save photo after editing, renaming it, uploading, creating new post, setting the title and date, assigning the featured image as the upload, then setting the category to Images so it’s added to the page. So, 8 steps, usually done over-and-over again to a dozen or so images in a batch. We’re talking over 96 steps to get a batch of images online – it took a bit of time, and was slightly demotivating, becoming a chore instead of a hobby.

Able to scratch my own itch – I came up with a way to automate everything. Instead of 96 steps, I now publish an entire batch of images in just 2 simple steps. Yes Two. Too. To. You read correctly, just 2! How’d I do it?

After editing the photos in Lightroom, I use Lightroom’s file-rename feature during bulk export that automatically sets the filename to the images meta timestamp, so YYYYMMDD.jpg.

I then use the following script tapping into the add_attachment hook during bulk upload that does the other 7 steps for each image. Everything in just 1 step, for the entire bulk.

https://gist.github.com/davidsword.ca4a6ec6cde878a8a47fde35feecab69

So, all I have to do after exporting from Lightroom, is drag-and-drop upload to the site.