<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
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/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>SDAC Inc &#124; Chicagoland Web Development &#187; get_post</title> <atom:link href="http://www.sandboxdev.com/tag/get_post/feed/" rel="self" type="application/rss+xml" /><link>http://www.sandboxdev.com</link> <description>Just another Sandbox Development and Consulting Inc. Sites site</description> <lastBuildDate>Wed, 25 Jan 2012 07:57:33 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Show One WordPress Post</title><link>http://www.sandboxdev.com/2008/11/04/show-one-wordpress-post/</link> <comments>http://www.sandboxdev.com/2008/11/04/show-one-wordpress-post/#comments</comments> <pubDate>Wed, 05 Nov 2008 02:47:23 +0000</pubDate> <dc:creator>Jennifer Zelazny</dc:creator> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[SDAC Blog]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress Logic]]></category> <category><![CDATA[get_post]]></category> <category><![CDATA[WordPress functions]]></category> <guid
isPermaLink="false">http://www.sandboxdev.com/?p=411</guid> <description><![CDATA[There is a great function you might be aware of that allows you to get one WordPress post and display it anywhere you would like (header, sidebar, home page, etc). To show only one post, use the function get_post. Example: The code above will show the title and content of the post with the post [...]]]></description> <content:encoded><![CDATA[<p>There is a great function you might be aware of that allows you to get one WordPress post and display it anywhere you would like (header, sidebar, home page, etc).</p><p>To show only one post, use the function <a
href="http://codex.wordpress.org/Function_Reference/get_post">get_post</a>.</p><p><strong>Example:</strong></p><pre class="brush: php; title: Custom Code; notranslate">
post_title;
$sdac_content = $show_post_id-&amp;gt;post_content;
?&amp;gt;
&lt;h2&gt;&lt;/h2&gt;
</pre><p>The code above will show the title and content of the post with the post ID of 10.  If you are not sure what your post ID is, go to the manage screen in the WP-Admin, and hover over the post title.  In your browser status bar, you will see the URL &#8211; and the post ID is the number at the end of the URL.</p> <script type="text/javascript">sdac_post_slideshows.push({fx: 'fade', timeout: 0, speed: 1000, pause: 0,})</script>]]></content:encoded> <wfw:commentRss>http://www.sandboxdev.com/2008/11/04/show-one-wordpress-post/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> </channel> </rss>
