While working on my Gutenberg Development Course, one of the hardest things I found to research was how to add block templates to your WordPress theme or plugin. Block templates are a way to have certain blocks show up by default for a new post, page or custom post type. You can also "lock" the template to … Continue reading How to Add Block Templates to Your WordPress Theme or Plugin
Category: WordPress Theme
How to Add a Custom “Color Palette” to Your WordPress Theme
One of the cool things I picked up while working on my Gutenberg Development Course was how to set a default color palette for all blocks inside your theme. Interestingly, as far as I can tell, defining custom color schemes is something only a theme should do and this cannot be set from within a custom block. Block Color … Continue reading How to Add a Custom “Color Palette” to Your WordPress Theme
How to Add JavaScript and CSS to Gutenberg Blocks the Right Way in Plugins and Themes
While working on my Gutenberg Editor Development Course I had a simple question early on: "How do I enqueue my block JavaScript and CSS to work with the Gutenberg Editor?" The short answer is there are two ways: enqueue_block_editor_assets - For enqueueing JavaScript and CSS in the admin editor only. enqueue_block_assets - Enqueues on both the frontend of the site … Continue reading How to Add JavaScript and CSS to Gutenberg Blocks the Right Way in Plugins and Themes
Update WooCommerce Order Address Dynamically When Customer Updates Their Address
The Problem While working on my JavaScript for WordPress redesign I came across a problem that ultimately had a simple solution, but it took me a while to figure out how to implement it. During the checkout process in WooCommerce I have removed many of the default fields to make sign up faster. Since my course is digital I … Continue reading Update WooCommerce Order Address Dynamically When Customer Updates Their Address
How to Redirect to Custom Page After Completing a LearnDash Course
One of the features I recently finished for the my redesign of my JavaScript for WordPress site was to have users taken to a special page once they complete a course. You can do this a number of ways, but here is how I did it: 1. Setup Congratulations Pages for Each Course The first thing I did was … Continue reading How to Redirect to Custom Page After Completing a LearnDash Course
Learn How I Built the JavaScript for WordPress Master Course and Teaching Site on the “How I Built It Podcast”
"If you're looking to setup an online course just grab this podcast!" I love hanging and chatting Joe Casabona. Naturally, I was excited when I found out he wanted to chat with me on his How I Built it Podcast about how I built my JavaScript for WordPress Master Course. A lot of folks have asked me content related questions about … Continue reading Learn How I Built the JavaScript for WordPress Master Course and Teaching Site on the “How I Built It Podcast”
$100 Off My WooCommerce Development Workshop at WooConf 2016
I'm super excited to head out to Austin on April 6-8 this year for my 2nd WooConf. This year I will be doing a workshop based on a WooCommerce Theme Development Course I did at Treehouse. Thanks to the folks at WooCommerce, I have an unlimited coupon code "WOOCONFZAC" for $100 off for anyone who wants to attend the conference … Continue reading $100 Off My WooCommerce Development Workshop at WooConf 2016
How to Overwrite Child Theme Functions
Big shout out to Otto for his article on Child Themes. I was recently trying to overwrite parent theme functions and came across this article. Scroll down a bit to Overriding Functions to see how it's done.
How to Send Emails in WordPress from the Functions.php
I have been working on a project that needs to occasionally send off emails. If you need to do so, here's how with wp_mail(): add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); wp_mail('whoever@whatever.com', 'Subject', 'Message'); Thanks to WordPress Cheat Sheets for the code!
WordCamp Austin Talk – The Template Hierarchy
Today I had the opportunity to speak at WordCamp Austin 2014 on "The Ins and Outs of the WordPress Template Hierarchy." Here are the slides for the talk: Google Presentation Link Here is the example template I used: Template Hierarchy Theme Thanks to everyone who attended!