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
Tag: php
PHP for WordPress Talk on WordCamp TV
A couple weeks ago I had a chance to present on PHP for WordPress at WordCamp Baltimore 2015. Thanks to the good folks who recorded and got everything together to post on WordCamp.tv you can now watch the video of the talk. https://videopress.com/v/cc1cGhB3 Check it out and then head over and learn more about my … Continue reading PHP for WordPress Talk on WordCamp TV
Slides for WordCamp Baltimore – Learning PHP for WordPress Development
I'm very excited to be back at a WordCamp in Baltimore, a town I love. Today I am speaking on PHP for WordPress, a topic near and dear to my heart since I learned PHP via WordPress and, as a teacher, guide others on this path as well. https://speakerdeck.com/zgordon/php-for-wordpress After you check out the slide … Continue reading Slides for WordCamp Baltimore – Learning PHP for WordPress Development
Slides From WordCamp Raleigh – Learn Web Design Via WordPress
The other week I had the great privilege of speaking at WordCamp Raleigh 2013. Here are my slides from the talk https://speakerdeck.com/zgordon/learn-web-design-via-wordpress
BackPress – WordPress Stripped Naked
I came across BackPress while reading about the WordPress Plugin API a while back. Basically it provides all of the core actions and filters from WordPress core to be used outside of the WordPress environment. Not sure when I'll have the chance to work with the framework, but it looks really cool and an awesome … Continue reading BackPress – WordPress Stripped Naked
A function to use remove_action conditionally in your WordPress templates
Thanks to Jonathan Perez for this little function to use remove_action conditionally. Helped when I was working on a WooCommerce project.
The woocommerce-hooks.php file is where it’s at for WooCommerce Templating
EDIT: This file has been moved to woocommerce/includes/wc-template-hooks.php Fully customizing WooCommerce did not make sense to me until I finally tracked down this file: /wp-content/plugins/woocommerce/woocommerce-hooks.php. This file lists all of the hooks and all of the actions that are added to the hooks. So, if you've ever tried searching through the rather abstracted template files … Continue reading The woocommerce-hooks.php file is where it’s at for WooCommerce Templating
How to Get Post Type within WordPress Loop
There are some times when you want to test for the post type of an item in your loop. You may use this in your functions.php file for taking dynamic actions for custom post types, or you may need to use it directly in your template. Either way, here is how you would save the … Continue reading How to Get Post Type within WordPress Loop