Home » Experts Only » Add YARPP to Custom Post Types: WordPress

Add YARPP to Custom Post Types: WordPress

A great little plugin for adding related posts to your blog has been around for a while: YARPP, Yet Another Related Posts Plugin. It’s fairly robust, for being free, but it does not natively support custom post types – a bummer.

A quick way around this is to add a simple piece of code in your functions.php file.

add_filter('wpcf_type', 'yarpp_support_func', 10, 2);
function yarpp_support_func($data, $post_type)
{
 if(in_array($post_type, array(
 'your-custom-post-type',
 )))
 {
 $data['yarpp_support'] = true;
 }
 return $data;
}

This is a handy little solution. Simply replace ‘your-custom-post-type’ with the slug of your CPT and you’re in business. Now related posts show up just fine and you can take advantage of all the great things YARPP has to offer! Custom programming has never been easier with WordPress.

A Quick Way To Kill Your Facebook Marketing

Facebook is a powerful tool. With millions upon millions of reachable users it is the social media powerhouse. Sharing content is incredibly easy and businesses can so easily engage potential customers that many businesses are putting it to work for them. There are, in fact, many ways to

OpenCart CCBill Payment Module ★★★★

4 Stars for this plugin. It worked, that part is true but we had to make some modifications and there were some syntax issues with the PHP. Overall though, a solid plugin for opencart and the ONLY one we found worth a darn for CCBill. We think our

Getting Accurate Shipping Rates

If you own an ecommerce store and provide real time shipping rates you have likely encountered a long list of issues with returning accurate rates. If you have not, Bravo good sir or madam! You are the exception. Having real-time shipping rates on your online store is a

Web Marketing Staff Training

How easy is it for one to do their own SEO? Difficulty level: 5 out of 10 If you know how to use a computer and can spare 3-5 hours per week then it is perfectly reasonable to expect you can do your own SEO and save hundreds

Gainesville Web Development

What a market. Gainesville has it all, especially its share of web developers. With new blood coming into the market – funnelled into and out of Gainesville via the University – our little town has an abundance of web developers looking to make a name for themselves. And we wish

Woocommerce Products Per Page

Interestingly Woocommerce does not seem to have a default setting for ‘products per page’. Unsurprisingly, there’s a simple workaround. Add to your functions.php Replace “28” with whatever number you want. add_filter( ‘loop_shop_per_page’, create_function( ‘$cols’, ‘return 28;’ ), 20 );