gettext – The Most Useful Filter in WordPress

camera filter

So you've found the perfect plugin: it has all of the functionality you need, it's within your budget, and there's surprisingly awesome support. Great – but what if you need to change just one little line of text? What if you want to do something simple like change “Add to Cart” to “Add to Basket”? Or change “Related Products” to “See these related products”?

If you're lucky there's a filter for that particular string but sometimes there isn't. Then what do you do?

Continue Reading…

Wysija Extension for Ninja Forms

Wysija logo

I'm very happy to announce that I've just released a Wysija extension for Ninja Forms! If you haven't heard of Wysija before make sure to check them out – they're an awesome newsletter service that you can manage through your own WordPress site. Now, with this extension you can allow users to automatically subscribe to your Wysija lists when they fill out a form on your website.

Continue Reading…

WordPress Can Handle High Traffic E-Commerce Demands!

I had a great time at WordCamp Grand Rapids last weekend. In addition to meeting awesome people I think that my presentation went really well and I had some awesome questions at the end. One of the questions I was asked during my presentation at WordCamp Grand Rapids last weekend was whether or not WordPress is even the right choice for an e-commerce solution and can it scale to handle high amounts of traffic? The answer is YES!

Continue Reading…

User Analytics Extension for Ninja Forms

Just a few weeks ago I saw a review by Pippin about Ninja Forms and I was immediately impressed. It is intuitive, well documented, & open source; all without a yearly fee. At the same time I was trying to get the most out of my contact forms and I was adding hidden fields that allow me to capture additional information (like geolocation, browser, operating system, etc) about the user without bothering them.

So, in the interest of getting the most out of every opportunity presented to me I took the plunge and developed User Analytics for Ninja Forms.

Continue Reading…

Adding CSS3 Animations to Features by WooThemes

Over the last couple of months I've really enjoyed using Features by WooThemes and Testimonials by WooThemes. One of the benefits of these plugins for someone who does a lot of custom theme development is that they come with no styling which makes the output very easy to manipulate. With the flexibility of this plugin I was able to easily add some simple CSS3 animations which really enhance the visual experience.

Continue Reading…

I’ll be Speaking at WordCamp Milwaukee 2013

WordCamp Milwaukee 2013 Background

I have some pretty exciting news. If you remember way back to the beginning of 2013 I mentioned that one of my resolutions is to speak at a WordCamp. Sometimes amazingly, it seems that all you have to do in life is set your intention and everything else falls into place. Shortly after announcing that I wanted to speak at a WordCamp, Dustin Filippini reached out to me and long story short – I've been accepted as a speaker for WordCamp Milwaukee! I'll be talking about my experiences working in an ad agency and how to effectively use marketing tactics without any of the shenanigans that you usually see.

The speaker list hasn't been officially announced yet but I can tell you that we have an absolutely phenomenal group and you'll be very pleased you took the time to go. If you're around Friday June 7th, through the 9th I encourage you to drop by WordCamp Milwaukee.

Continue Reading…

Add oEmbed to Post Meta Data in WordPress

WordPress has an awesome oEmbed feature where a user just has to enter the url of the media you want embedded and WordPress takes care of the rest. Sadly, this only works when you put the link in the content. If you're creating custom post types, a plugin, or using custom meta data you may run into a situation where you want to embed some media that isn't in the content in which case you need to do a little coding.

Apply Filters to the Media

The first thing we have to do is add a filter right before you print your content. You can think of the apply_filters() function as a placeholder for more code.


<?php
// get media; could be a url to a tweet, or youtube video, or something else;
$media;
$media = apply_filters( "my_media_filter", $media );
// add filter for oEmbed
$media = apply_filters( "my_media_filter", $media );
// print embedded media
echo $media;

view raw

functions.php

hosted with ❤ by GitHub

Add WordPress Embed Functionality to Filter

The last thing we have to do is tell WordPress to add the default oEmbed functionality to anything in our filter.


<?php
// add filters for oEmbed
global $wp_embed;
add_filter( 'my_media_filter', array( $wp_embed, 'autoembed' ), 8 );

view raw

functions.php

hosted with ❤ by GitHub

Conclusion

You're custom post data has the awesome oEmbed functionality. Time to celebrate. 🙂