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.

More Web Design Blog Content

The Best of HTML 5

Thank Goodness HTML 5 is finally here and it’s everything we expected it to be and more! Out of the many new features with the code standards comes with it many new and exiting programs to facilitate the production of HTML 5 websites. One great new tool is

Sullivan Welding Has A New Website

Sullivan welding does excellent custom welding and fabrication. Willum is the owner and manages a crew of expert custom welders. He came to Livewire looking for the best in Gainesville Web Design and we were able to set him up in a great new website in just a

Linking Your G+ Page To Your Website

We always get asked: Does anyone use G+? Yes. Is it worth it? Again, Yes. Using Google’s products would obviously help your standing with their search algorithm. We don’t know this to be technically true but it certainly seems so in our experience. The more you use and

Google Removing Anonymous Reviews

So it appears, as far as Search Engine Journal is reporting, that Google is removing anonymous reviews. And, honestly, why wouldn’t they? If you’re going to write a review you should have the guts to state your first name … or take the time to create a fake

Learning how to code?

We get questions all the time about how we started doing all this. Where did we learn to code? How on earth does any of that make sense? Some people are interested in learning for themselves. It’s easy to get started, especially in this day and age. Back

WordPress Custom Post Type Category Images : Solved

If you’re a WordPress developer, you’ve probably been here. You want to use images for your categories, but they are custom taxonomies. Here’s how to solve that issue. We’re using a plugin called “Category Images” by Muhammad Said El Zahlan. Download, install and activate the plugin. Now you can