I knew this Gravity Forms code would come in handy sometime. Mostly, I’m writing it down for my own reference material, so I can Google it later. So, this is some code I wrote in late-2016 for a custom theme project where I had to style Gravity Forms radio buttons to have different color “bullets” […]
Styling Radio Buttons in Gravity Forms
Add CSS Class To Single Post Based on Category In WordPress
Here’s how to add a CSS class to the body tag of a single post or post type, based on the post category, in WordPress. Why would you want to do this? Maybe you want to add custom CSS styles to single posts in specific categories, but you don’t want to create a custom template […]
Get the URL of a Featured Image in WordPress
Sometimes it is useful to get the URL of a Featured Image in WordPress, instead of just outputting the image itself as HTML. When would you use this? If you need to get the URL in order to use it for a background image, as in a header at the top of the page, for […]
bbPress: Add Forums, Topics & Replies to Search Results
Many people who use bbPress may notice that WordPress by default doesn’t return topics, replies, or forums in search results. This can defeat the purpose of having forums on your site, if they aren’t easily searchable. This is a code snippet that will add forums, topics, and replies from bbPress to your WordPress search results. […]
Add Advanced Custom Field To RSS Feed In WordPress
One way to move people from being prospects to being customers is to educate them through content marketing. This usually takes the form of blogging, podcasting, videos, or some other form of serialized content, published on your company blog. Many companies use their email newsletter as a way to send their RSS feed directly to […]
Change Proceed To PayPal Checkout Text in WooCommerce
A reader asked how to change the Proceed To Paypal button text on the WooCommerce Checkout page. I figured there would be a filter for this, because it’s WooCommerce. but because it’s a payment gateway, there’s no built in hook for this button, like there is for the Place Order button text. What I found […]
HTML: Give Parent Div 100% Height Of Child Floated Elements
Many web designers and front end developers have been stumped by this dilemma before. When you have a parent div with only floated child elements inside, how do you give the parent element the height of the floated child elements? Before we look at the answer, let’s look at why this is a problem in […]
Add Manual Exceprts to Pages in WordPress
Excerpts in WordPress are sometimes used as preview text on an archive page (like a blog or category page). WordPress themes usually enable excerpts on Posts by default. If you are editing a post, and don’t see the field for Excerpt, it is probably hidden under the Screen Options tab in the top right corner. […]
Add an Options Page with ACF (Advanced Custom Fields)
Over the course of the last eight years, I’ve built over 150 sites, most using WordPress. This code snippet is something I’ve used with ACF PRO aka Advanced Custom Fields PRO in order to set up an Options Page. The data from this newly created Options Page would be saved in the wp_options database table. […]
WooCommerce 2.5: Add SKU On New Order Email
Update: This bug has been fixed in WooCommerce 2.5.1 for Admin New Order notifications only. If you are running WooCommerce 2.5, test the 2.5.1 upgrade on a staging server. Once you’ve determined everything is functioning normally, upgrade to WooCommerce 2.5.1 on your production (live) server. The WooCommerce update to version 2.5 was a major update, […]