Check a field in Gravity Forms against a list of allowed values

This snippet allows you to check the value of a field against a list of permitted values to see whether it is valid. In my case, I needed to check whether the submitted company code matched one of the issued company codes to ensure that the user was permitted to sign up as an employee of an eligible company.

Screen Shot 2016-06-16 at 7.42.45 AM

How to add dynamic CSS to WordPress with wp_add_inline_style()

With wp_add_inline_style, you can add CSS dynamically based on any data, such as post/user/term meta or settings from wp_options.


Enqueue scripts and styles with automatic versioning

Versioning your CSS and JS means that you can improve page speed by leveraging caching and this method does it all automatically for you by using the time the file was last modified as the version number.


Creating custom sites with post types, taxonomies and meta

Thanks for attending my talk at WordCamp Tampa 2015. Once the video is up on, I’ll post it here to supplement the slides and links below – in the meantime, I’ve got a simple video up on Vimeo for you to go along with. Helpful links from the presentation Putting things where they belong (building a functionality plugin) GenerateWP WordPress Developer Code Reference WordPress Codex register_post_type() register_taxonomy() Dashicons CMB2 (wiki) WP_Query Template Hierarchy get_post_meta()


Show prefix/suffix for posts in a certain category

This function allows you to show a suffix or prefix on the post title for posts in a certain category without actually editing the post title.


Managing projects in git with branches

This is my development workflow that I use for projects based in git. The idea is simple: branch everything and create branches for each of your hosting environments too.


Deploying your plugin to GitHub and simultaneously with great ease

Using a deployment script is the quickest and easiest way to get your plugin or theme deployed to GitHub and simultaneously to And the best part? You don’t need to know anything about Subversion.


Pass YOURLS short links to Jetpack’s Publicize and Sharing modules

Using filters, you can pass your YOURLS shortlink to Jetpack’s Publicize and Sharing modules to get the most out of your YOURLS click stats


How to deactivate certain plugins on your development servers

There are certain plugins that you simply don’t want running on your local or staging sites, so this is how I manage systematically deactivating them.

How to run BuySellAds over SSL in WordPress

BuySellAds now supports SSL which means that you can upgrade your whole site to HTTPS even if you’re running BSA ad zones