WP & Custom Triberr Post Titles #wpcode #wordpress #code
I recently joined triberr.com which groups twitter users together who agree to retweet each other’s submitted tweets. I belong to Romance Writer’s Ink (lead by Skhye Moncrief) and could potentially reach 31k peeps with each tweet. Tres cool.
Cool thing about it is that Triberr tugs posts via an rss feed. Cool, right? EXCEPT, for triberr posts, since they’ll end up on twitter, you want to toss in hashtags (#cool). But, do you really want to show your regular blog readers a title filled with hashtags? No?
Me neither.
Thus, I began my quest. I wanted WordPress to give me a customized title on my RSS feed for only specific posts. Not all, just the ones I’m sending to triberr. I wanted general visitors to see: Easy Titles for Triberr! while twitter peeps will see: Custom titles for triberr & WP code made easy #wp #wordpress #wpcode
I searched google, then got annoyed. I contacted wordpress developers… then gasped b/c their pricing ranged from $225 to $500+.
Eep!
BUT, I found the code! Two days of searching and my answer is 13 lines long. Boo-yeah!
****************************************
add_filter(‘the_title_rss’, ‘custom_feed_title’);
function custom_feed_title($title) {
$headline = get_post_meta(get_the_id(), ‘tribe‘, true);
if (!empty($headline))
return $headline;
return $title;
}
****************************************
So, that code needs to be pasted into your theme’s functions.php file.
Once that’s done, you’ve just gotta be careful of TWO things.
1. When you write a post that you want sent to triberr, you need to give it a category of Triberr. I’ll tell you why at the end.
2. When you WRITE that triberr post, below your post entry box, you’ll see a section called “Custom Fields”. You want to ADD a custom field called “tribe” (without the quotes) and in the Value box, you’ll put in your preferred post title. You’ll notice that I highlighted “tribe” in the code snippet. That’s because you needed to see how it relates to this step.
Assuming you’ve done all of that, the feed link that you’ll give to triberr would be: www.yourdomainname.com/category/tribe... or http://yourdomainname.com/category/tr....
So, paste code into functions.php. Setup Triberr category. Add post, making sure that it has a “tribe” custom field with your preferred title. Then, make sure that Triberr is setup to pull the feed for your Triberr category.
ETA- Since WP is passing raw data to the feed, it’s not digging ampersands in your custom fields. In that case, use & in your custom field and it’ll parse as an ampersand, thus saving ze space.
Tada!
Have a mwah! filled day!

If you enjoyed this post, don't forget to subscribe to Celia Kyle's RSS feed. If you'd like to be notified of new releases AND get five free ebooks, register for Celia Kyle's newsletter.


