I like to use the Scriptless Social Sharing WordPress plugin to add Share buttons to my blog posts. Recently I had a client notice that because the Email Share button has target=”_blank” in the HTML markup, it opens a new tab when clicked. This is great behavior if you’re using web based email (e.g. Gmail), however if you’re using an email application on your computer, you end up with a blank tab. This code removes target blank from the email share link.
WordPress Plugin
Apply Bootstrap Classes to Gravity Forms Button
When working on a project, using Gravity Forms and Bootstrap, I wanted to style the buttons with Bootstrap. This code allows me to modify the markup output by the Gravity Forms WordPress plugin to use the Bootstrap classes.
functions.php vs plugin vs mu-plugin for WordPress
It is common for articles on writing WordPress code to refer to adding the code to the functions.php file in the active theme. This is one location where code can be added but it isn’t always the best. Places to Add WordPress Code a new file in wp-content/mu-plugins a new plugin in wp-content/plugins the functions.php […]
WordPress Development Overlay
When doing WordPress theme development I find it helpful to overlay an image of the approved design on top of the code I’m working on. I use a reduced opacity on the image so I can see the code I’m working on. This helps me match things like font size and spacing. I’ve been doing […]
WordPress Anchor Shortcode Plugin
Once an article reaches a certain length, it is valuable to allow linking to a specific part of the page by creating anchor locations. Unfortunately, creating an anchor location in WordPress involves writing raw HTML, which is not an ideal client solution. There are other solutions out there but Blinebury Design wanted a specific set […]
Make Your WordPress Plugin Easy to Extend
As a WordPress developer it is a painful (and all too familiar) feeling of angst, when I find a plugin that does almost exactly what I want but the author has left no way for me to modify the behavior without changing their code. Don’t Hack Core (or plugins) A popular refrain in WordPress developer […]
Overridable Templates in Your WordPress Plugin
There are many WordPress plugins that allows you to provide your own template in your theme that overrides the default template (e.g. WooCommerce). I’d like to look at how you can add this functionality to your own plugin. Default Template For demonstration purposes I’ve created a WordPress plugin called the Raptor Button plugin. This plugin […]
Make Your Plugin Translatable
As we watch the number of non-English WordPress installations grow faster than English installations, the value of making your plugin “translation ready” grows as well. In order to make your plugin translatable (this is also know as Internationalization or I18n), there are three things you need to do. 1. Use Translation Functions Whenever you use […]
Improve Genesis Theme Search
Over on the Yoast SEO Blog there is a great post on How to Improve WordPress Search. It is definitely worth a read (I can wait if you want to read it right now). I’m a big fan of the Genesis framework (see Why I Use the Genesis Framework) and implementing some of these changes […]
Delete Transients on Plugin Deactivation
When I was a child, my mother often reminded me to clean up after myself. While I’m pretty sure she was talking about the kitchen, this is great advice for plugin authors as well. When someone deactivates your plugin, it is good form to remove anything you added to the database. The most common place […]