What's the difference between actions and filters in WordPress? In this "Sloppy Screencast", i.e. a recording from a tutoring session, we will explore.
I have a new project coming up that is the perfect opportunity to refine my WordPress process. Building the site as a "headless CMS" and finally digging into React was at the top of my mind, but after some research, I've decided the head will stay on.
A follow up to my pre-WordCamp post about hesitations regarding Gutenberg. Blocks are the future, and I'm excited! Gutenberg and blocks will change the web, or at least 30% of it.
This post has been marinating in my drafts for a few weeks, and I'd like to get it out into the world before I learn a whole bunch through talks and conversations at WordCamp US this weekend and refine my views accordingly.
As someone who works with WordPress on the regular, output buffering is one of those concepts that I've encountered in the past and, until now, never needed to understand. I hope this serves to be a relatively plain language description of what output buffering is at a high level, and will illuminate the concept for others!
Although Timber ultimately simplifies templating in WordPress, there’s a bit of a barrier to entry. If you haven’t worked in a templating language before, it takes some time to get a handle on what’s possible. The following are some introductory Twig concepts and snippets I’ve found particularly useful when working with Timber and Advanced Custom Fields.
I've been jamming on WP Super Cache
these days. As great as Super Cache is (and it is
great), however, you will consistently be failing in YSlow
's "Expires Headers", Web Page Test
's "Cache Static Content", and Google Page Speed Insights'
"Leverage Browser Caching". Shouldn't a plugin with name "Super Cache" take care of all things caching? Not necessarily.
A recap of my talk "Sassy WordPress" along with some updates I'll add should I give the talk again.
I found the Twig documentation for using key value pairs from PHP arrays a little sparse, so thought I’d elaborate.
I’m excited to officially announce the launch of MTNmeister.com. It was really fun to build, thanks to my new favorite pair of things in the world: Timber with Advanced Custom Fields. I’d like to share some highlights of my process, and maybe even convince you to try out Timber on your next project.
I’m constantly reading about workflows and new tools, and don’t really get a chance to use them until something fresh comes around (or if I make an extra 5 hrs to try them out). Anyhow, I’ve got some WordPress in the works and wanted to share these excellent finds.
I gave a presentation on Child Themes at the NYC WordPress Meet Up – I think it went well! There’s the video. Check the the slides here. (Slides created with reveal.js. Let’s take a moment to appreciate the developers on that one […]
UPDATE: Just use Justin Tadlock’s Cleaner Gallery plugin. I am in the midst of rewriting my WP theme WPFolio Two. I wanted to make the gallery thumbnail images a flexible width rather than their default fixed width. To do this, I gave the attachment images themselves […]
That’s right, I didn’t like it for a while. Had a pretty scarring experience with a WordPress/BuddyPress site running on 20+ heavy duty plugins, and I fully realized why people say it’s messy on the backend. I had been doing a lot of custom coding, and dealing with WP hooks […]
Why haven’t I encountered/thought of this before?! If you noticed earlier, this site and the WPF2 demo site where giving off some 404s…embarrassing but oh well. Planning to write a post about all of that later. Anyways, maintenance mode is a setting you can turn on to let viewers know […]
I recently added 270x270px gallery and post thumbnails to WPFolio Two. They look damn nice in columns of three in the portfolio categories. While working on this, I found that WP's thumbnail/image attachment functions are not so well documented, so I wanted to be sure to share what I figured out. Here I'll go over the code to change the thumbnail size with add_image_size, then grab a post's first attachment and turn that into the thumbnail, and finally filter the gallery shortcode to change gallery thumbnail sizes.
NOTE : this is a relatively verbose tutorial, so you can just download the code here if you like.
First download the Regenerate Thumbnails plugin. Run it whenever you want to see your changes, mainly when you are wondering why the thumbnails are not being cropped.
Everything goes in functions.php. First, you'll need to add theme support for thumbnails, set the thumbnail size, and add a custom image size for the generated thumbnails. That happens like this:
WP generates a special URL for resized post thumbnail images, for example, the URL of a 150 x 150 thumbnail of myimage.jpg would be ../wp-content/uploads/2011/09/myimage-150x150.jpg. This can be changes in Settings/Media. The function add_image_size('wpf-thumb', 270, 270, true), essentially does the same thing, but is adding a new image size called 'wpf-thumb' rather than changing the 'Thumbnail' size. The 'true' sets cropping mode to true. If false, your images will retain their original proportions i.e. will not be even squares. Later, we will apply 'wpf-thumb' to an image url for the post thumbnails created from attachments.