Celia Kyle's Blog, page 26

September 24, 2012

WP & Custom Triberr Post Titles #wpcode #wordpress #code

triberr-celia-kyle-paranormal-bbw-romance-author


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!


celia signature


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.

 •  0 comments  •  flag
Share on Twitter
Published on September 24, 2012 19:56

WP and Custom Triberr Post Titles #wpcode #wordpress #code

triberr-celia-kyle-paranormal-bbw-romance-author


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.


Tada!


Have a mwah! filled day!

 •  0 comments  •  flag
Share on Twitter
Published on September 24, 2012 15:56

September 23, 2012

Manday Monday 9.24.12

 •  0 comments  •  flag
Share on Twitter
Published on September 23, 2012 22:37

ta da #awesome #cool #me

 •  0 comments  •  flag
Share on Twitter
Published on September 23, 2012 18:37

September 21, 2012

September 2012 Take Two

Head Over Tail is DONE!  I’ve sent it in to my editor (ze awesome Chris Stout) and am officially off for THREE days.  No writing, no plotting, nada.  Well, reading, maybe.  I snagged a couple of books (Little Squirrels Can Climb Tall Trees by Michael Murphy and Moving On by HJ Holt).  I ALSO just read Steamroller by Mary Calmes.  Have I mentioned how much I love her?  My manlove love is split equally between her and Amy Lane.


Anyway. HOT is done and I hope to have it out within the next two weeks.  Then it’s on to another Knots story and then back to Ridgeville.  Also, for you print book lovers, I’m working on bundling He Ain’t Lion, You’re Lion and Ball of Furry into a single paperback volume.  Stay tuned for updates!


Mwah!

 •  0 comments  •  flag
Share on Twitter
Published on September 21, 2012 20:37

September 20, 2012

Triberr Test Post

Testing


celia signature
 •  0 comments  •  flag
Share on Twitter
Published on September 20, 2012 18:22

September 16, 2012

Manday Monday 9.17.12


 









Celia Kyle would like to rule the world and become a ninja. As a fall-back, she’s working on her writing career and giving readers stories that touch their hearts and *ahem* other places.

Check out the home page on her site for her newest releases: http://celiakyle.com

 •  0 comments  •  flag
Share on Twitter
Published on September 16, 2012 22:29

September 12, 2012

Media

If you are a representative or participant in a book, romance, news or industry blog/website and would like to interview me or would like me to write an article for your site, please feel free to contact me using the form below.


If you are a reviewer and would like a copy of one of my books for review, please contact me and I will forward the appropriate file(s).  I can also add you to the list of review sites I submit to with each new release.


I own all subsidiary rights to each work listed on the site and would love to speak with publishers and agents in regards to exercising those rights.


[contact-form-7]

Celia Kyle would like to rule the world and become a ninja. As a fall-back, she’s working on her writing career and giving readers stories that touch their hearts and *ahem* other places.

Check out the home page on her site for her newest releases: http://celiakyle.com

 •  0 comments  •  flag
Share on Twitter
Published on September 12, 2012 15:57

About

Celia Kyle would like to rule the world and become a ninja. As a fallback, she’s working on her writing career and giving readers stories that touch their hearts and *ahem* other places.



[contact-form-7]

Celia Kyle would like to rule the world and become a ninja. As a fall-back, she’s working on her writing career and giving readers stories that touch their hearts and *ahem* other places.

Check out the home page on her site for her newest releases: http://celiakyle.com

 •  0 comments  •  flag
Share on Twitter
Published on September 12, 2012 15:44