<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Programmatically Creating Posts in WordPress</title>
	<atom:link href="http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=programmatically-creating-posts-in-wordpress</link>
	<description>Useful Resources For Webmasters</description>
	<lastBuildDate>Thu, 09 Feb 2012 17:02:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ryan</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-20688</link>
		<dc:creator>ryan</dc:creator>
		<pubDate>Tue, 31 Jan 2012 14:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-20688</guid>
		<description>I found a great tutorial adding post and comment programmatically here&#039;s the link http://www.sutanaryan.com/blog/wordpress/how-to-create-post-and-comment-in-wordpress-programmatically</description>
		<content:encoded><![CDATA[<p>I found a great tutorial adding post and comment programmatically here&#8217;s the link <a href="http://www.sutanaryan.com/blog/wordpress/how-to-create-post-and-comment-in-wordpress-programmatically" rel="nofollow">http://www.sutanaryan.com/blog.....mmatically</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Léon</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-20190</link>
		<dc:creator>Léon</dc:creator>
		<pubDate>Tue, 25 Oct 2011 14:39:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-20190</guid>
		<description>There is a plugin for it:
http://wordpress.org/extend/plugins/exec-php/</description>
		<content:encoded><![CDATA[<p>There is a plugin for it:<br />
<a href="http://wordpress.org/extend/plugins/exec-php/" rel="nofollow">http://wordpress.org/extend/plugins/exec-php/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Léon</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-20188</link>
		<dc:creator>Léon</dc:creator>
		<pubDate>Tue, 25 Oct 2011 11:52:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-20188</guid>
		<description>Check out wp_insert_attachment() at http://codex.wordpress.org/Function_Reference/wp_insert_attachment

Small example from John K @ http://stackoverflow.com/questions/2674069/adding-posts-with-thumbnail-programatically-in-wordpress:
 
    $post_id = wp_insert_post( $my_post_data ); 

    $attach_id = wp_insert_attachment( $attachment, $filename, $post_id );
    $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
    wp_update_attachment_metadata( $attach_id,  $attach_data );</description>
		<content:encoded><![CDATA[<p>Check out wp_insert_attachment() at <a href="http://codex.wordpress.org/Function_Reference/wp_insert_attachment" rel="nofollow">http://codex.wordpress.org/Fun.....attachment</a></p>
<p>Small example from John K @ <a href="http://stackoverflow.com/questions/2674069/adding-posts-with-thumbnail-programatically-in-wordpress" rel="nofollow">http://stackoverflow.com/quest.....-wordpress</a>:</p>
<p>    $post_id = wp_insert_post( $my_post_data ); </p>
<p>    $attach_id = wp_insert_attachment( $attachment, $filename, $post_id );<br />
    $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );<br />
    wp_update_attachment_metadata( $attach_id,  $attach_data );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anjali</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-20185</link>
		<dc:creator>Anjali</dc:creator>
		<pubDate>Tue, 25 Oct 2011 06:01:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-20185</guid>
		<description>Like the above we can add posts programatically.How can i add thumbnails programatically.</description>
		<content:encoded><![CDATA[<p>Like the above we can add posts programatically.How can i add thumbnails programatically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-19619</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 11 Jul 2011 22:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-19619</guid>
		<description>You can use HTML in the post content, but not PHP. It&#039;s the same as with the post editor: it won&#039;t process PHP, but you can use shortcodes.</description>
		<content:encoded><![CDATA[<p>You can use HTML in the post content, but not PHP. It&#8217;s the same as with the post editor: it won&#8217;t process PHP, but you can use shortcodes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amin</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-19616</link>
		<dc:creator>Amin</dc:creator>
		<pubDate>Sun, 10 Jul 2011 14:28:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-19616</guid>
		<description>hello and thanks for the useful post!

well I was wondering if you could help me with something here!

I use this code to create pages automatically in wordpress by activating the theme! but I want the content of the page to be some HTML and PHP code that I have written!

is that possible? and if yes, how is it possible?!

It would be very kind of you to help me with that!

Regards 
Amin</description>
		<content:encoded><![CDATA[<p>hello and thanks for the useful post!</p>
<p>well I was wondering if you could help me with something here!</p>
<p>I use this code to create pages automatically in wordpress by activating the theme! but I want the content of the page to be some HTML and PHP code that I have written!</p>
<p>is that possible? and if yes, how is it possible?!</p>
<p>It would be very kind of you to help me with that!</p>
<p>Regards<br />
Amin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro Lopes</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-18894</link>
		<dc:creator>Pedro Lopes</dc:creator>
		<pubDate>Sat, 05 Feb 2011 13:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-18894</guid>
		<description>I&#039;m looking to add a image attached to the post, or even make it as the thumbnail. Is it possible?</description>
		<content:encoded><![CDATA[<p>I&#8217;m looking to add a image attached to the post, or even make it as the thumbnail. Is it possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shal</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-12013</link>
		<dc:creator>Shal</dc:creator>
		<pubDate>Wed, 22 Sep 2010 22:09:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-12013</guid>
		<description>hi there this is all great but is it possible to also create custom fields using this function? And also to assign a template? I want to basically auto create posts by submitting a title and some content, then use database info to complete the post so that we can scale our workload. however the only thing missing is to be able to add a few custom-fields which we need for each post!

thanks</description>
		<content:encoded><![CDATA[<p>hi there this is all great but is it possible to also create custom fields using this function? And also to assign a template? I want to basically auto create posts by submitting a title and some content, then use database info to complete the post so that we can scale our workload. however the only thing missing is to be able to add a few custom-fields which we need for each post!</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mario</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-11650</link>
		<dc:creator>mario</dc:creator>
		<pubDate>Fri, 02 Jul 2010 21:38:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-11650</guid>
		<description>If you need to use a plugin to create forms, then you probably shouln&#039;t be doing things programatically. HTML Forms + jQuery can do much more than GravityForms with not much effort IF you&#039;re a developer. And you can create plugins that don&#039;t have a dependency on a paid plugin.</description>
		<content:encoded><![CDATA[<p>If you need to use a plugin to create forms, then you probably shouln&#8217;t be doing things programatically. HTML Forms + jQuery can do much more than GravityForms with not much effort IF you&#8217;re a developer. And you can create plugins that don&#8217;t have a dependency on a paid plugin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leon</title>
		<link>http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/#comment-11630</link>
		<dc:creator>Leon</dc:creator>
		<pubDate>Mon, 28 Jun 2010 08:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3007#comment-11630</guid>
		<description>You have to escape the data probably.
You can use WP function esc_attr
http://codex.wordpress.org/Function_Reference/esc_attr</description>
		<content:encoded><![CDATA[<p>You have to escape the data probably.<br />
You can use WP function esc_attr<br />
<a href="http://codex.wordpress.org/Function_Reference/esc_attr" rel="nofollow">http://codex.wordpress.org/Fun.....e/esc_attr</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Served from: www.webmaster-source.com @ 2012-02-09 22:45:36 by W3 Total Cache -->
