Disable Gutenberg for specific post types

add_filter(‘use_block_editor_for_post_type’, ‘prefix_disable_gutenberg’, 10, 2); function prefix_disable_gutenberg($current_status, $post_type) { if ( ($post_type === ‘post’) || ($post_type === ‘event’) ) return false; return $current_status; }

How to remove the custom color picker from Gutenberg

function prefix_gutenberg_disable_all_colors() { add_theme_support( ‘editor-color-palette’ ); add_theme_support( ‘disable-custom-colors’ ); } add_action( ‘after_setup_theme’, ‘prefix_gutenberg_disable_all_colors’ );

Configuring BitBucket pipelines for deploying to FTP site

This is the code I have used in my bitbucket-pipelines.yml file to successfully deploy a BitBucket repo to my server using FTP: pipelines: default: – step: script: – apt-get update – apt-get -qq install git-ftp – git ftp init –user $FTP_USERNAME –passwd $FTP_PASSWORD ftp://YOUR_WEBSITE_URL Note: after the first commit, change the last line to: – Read more…

WordPress: Wrap the published day, month, and year in span tags

Here is a quick and easy way to wrap the individual elements of your WordPress template’s published date output in tags: Note: the key is to escape the each letter of the tag declaration with a back slash.

WordPress Tricks: How to create a WYSIWYG page template for an archive page

Recently, I was working on a WordPress site and needed the ability to have editable page content at the top of the archive page for a custom post type. It took me a bit to figure out how to accomplish it but once I did, I am happy to report the solution was quite simple! Read more…

WordPress Tricks: A simple shortcode which will output the site title

Here is a very simple way to create a shortcode that will output your WordPress site’s title. Copy and paste this snippet into your active theme’s functions.php file: Now you can easily output the current site title anywhere in your content using the shortcode [site_title]

jQuery Tip: Scroll to the top of active accordion items whenever a new item is expanded (with the option to account for a fixed header)

Here is a really handy tip on how to add functionality for a user to be scrolled to the top of the currently active accordion item whenever a new accordion item is expanded. The key here, and the one that I have spent more hours than I care to remember trying to figure out, is Read more…

CSS Tip: How To Vertical Align One Div Inside Another

Here is the handy CSS code you can use to vertically align one div inside a parent div: I found this code on this StackOverflow answer.

WordPress Tricks: Allowing the use of shortcodes within custom shortcodes

I was recently working on a site where I needed to add custom shortcodes and also allow the use of shortcodes within my custom shortcodes and here is how I did it. I started by adding the standard code for creating custom shortcodes to my functions.php file: And then wrapped $content in the do_shortcode() function, Read more…

WooCommerce Tips: Customizing the Credit Card Image for the WooCommerce Paypal Pro Plugin

Here is the code I used in my theme’s functions.php file to customize the images displayed on the Checkout page on a website using the WooCommerce Paypal Pro plugin: I imagine you can use this snippet for other payment gateways as well, since I actually customized this code based off an article I found which Read more…