Create a WordPress Post from Node.js

Watch out! This tutorial is over 7 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

WordPress uses an XML-RPC interface by default. XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism. With WordPress XML-RPC support, you can post to your WordPress blog using many popular clients. You could even consider writing your own client application using Node.js. Let’s do a proof of concept.

Continue reading

Post Thumbnails in WordPress RSS Feed

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Include the post thumbnail in your RSS feed.

// Put post thumbnails into rss feed
function itlc_feed_post_thumbnail($content) {
	global $post;
	if(has_post_thumbnail($post->ID)) {
		$content = '' . $content;
	}
	return $content;
}
add_filter('the_excerpt_rss', 'itlc_feed_post_thumbnail');
add_filter('the_content_feed', 'itlc_feed_post_thumbnail');