<?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: How to add recent WordPress post exceprts on an external html page</title>
	<atom:link href="http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/</link>
	<description>Thoughts on Web Design and Front-end Coding. Served up Monthly by Jamis Charles</description>
	<lastBuildDate>Tue, 17 Jan 2012 22:25:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mena</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1969</link>
		<dc:creator>Mena</dc:creator>
		<pubDate>Fri, 28 Oct 2011 19:53:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1969</guid>
		<description>i&#039;m not expert, i said that because i found that i will put my database name and password in the html file. :D .. will this risk ?</description>
		<content:encoded><![CDATA[<p>i&#8217;m not expert, i said that because i found that i will put my database name and password in the html file. <img src='http://www.jamischarles.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  .. will this risk ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jamis</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1968</link>
		<dc:creator>jamis</dc:creator>
		<pubDate>Mon, 24 Oct 2011 21:08:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1968</guid>
		<description>@Mena How so?</description>
		<content:encoded><![CDATA[<p>@Mena How so?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xplain</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1967</link>
		<dc:creator>xplain</dc:creator>
		<pubDate>Mon, 24 Oct 2011 20:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1967</guid>
		<description>Great stuff! All is working well accept for whatever reason my charset does not seem to be converting properly. I&#039;ve got my html meta content set and I even tried adding a mysql_query but still no luck. Any ideas? Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Great stuff! All is working well accept for whatever reason my charset does not seem to be converting properly. I&#8217;ve got my html meta content set and I even tried adding a mysql_query but still no luck. Any ideas? Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mena</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1966</link>
		<dc:creator>Mena</dc:creator>
		<pubDate>Sat, 22 Oct 2011 13:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1966</guid>
		<description>I guess this will risk my database ?</description>
		<content:encoded><![CDATA[<p>I guess this will risk my database ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jamis</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1965</link>
		<dc:creator>jamis</dc:creator>
		<pubDate>Sat, 17 Sep 2011 04:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1965</guid>
		<description>@Wade,

It shouldn&#039;t have to be on the same server. You do have to make this adjustment, though.

On line 10 of the first script where it says &quot;localhost&quot;:

mysql_connect(localhost, $db_username, $db_password);

If it&#039;s on the same server, you use localhost. If not, enter the IP address of the DB server. If your client has a CPanel account, the left rail should list the IP address of the DB server.</description>
		<content:encoded><![CDATA[<p>@Wade,</p>
<p>It shouldn&#8217;t have to be on the same server. You do have to make this adjustment, though.</p>
<p>On line 10 of the first script where it says &#8220;localhost&#8221;:</p>
<p>mysql_connect(localhost, $db_username, $db_password);</p>
<p>If it&#8217;s on the same server, you use localhost. If not, enter the IP address of the DB server. If your client has a CPanel account, the left rail should list the IP address of the DB server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wade</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1963</link>
		<dc:creator>Wade</dc:creator>
		<pubDate>Sat, 10 Sep 2011 22:56:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1963</guid>
		<description>Hey Jamis, quick question.  I am currently re-designing a website for a client and was going to use the code discussed here so that the client can constantly update new content on their front page for their current events.  Code seems to be active in my testing server, save that the database cannot be found.  I followed all of the steps correctly, which leads me to ask:

Does this index.php file have to be actively in the same root folder (on the same server, in essence) in order for it to work?  Should it not be able to find the base folder no matter of the php file in question being on a different server than the blog is?  If you could help me unravel this, I&#039;d much appreciate it.</description>
		<content:encoded><![CDATA[<p>Hey Jamis, quick question.  I am currently re-designing a website for a client and was going to use the code discussed here so that the client can constantly update new content on their front page for their current events.  Code seems to be active in my testing server, save that the database cannot be found.  I followed all of the steps correctly, which leads me to ask:</p>
<p>Does this index.php file have to be actively in the same root folder (on the same server, in essence) in order for it to work?  Should it not be able to find the base folder no matter of the php file in question being on a different server than the blog is?  If you could help me unravel this, I&#8217;d much appreciate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hobie</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1951</link>
		<dc:creator>hobie</dc:creator>
		<pubDate>Tue, 23 Nov 2010 03:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1951</guid>
		<description>can you tell me how to change this:

SELECT DISTINCT wp_posts.post_title, wp_posts.post_content
FROM wp_posts, wp_term_relationships
WHERE wp_term_relationships.object_id = wp_posts.ID AND post_status = &#039;private&#039; AND wp_term_relationships.term_taxonomy_id = 3
ORDER BY wp_posts.post_date DESC

which tells this in dreamweaver:
{rsEvents.post_title}

{rsEvents.post_content}

to post all the blogs - I want to only post 5 blogs, and only the first 2 lines of each blog</description>
		<content:encoded><![CDATA[<p>can you tell me how to change this:</p>
<p>SELECT DISTINCT wp_posts.post_title, wp_posts.post_content<br />
FROM wp_posts, wp_term_relationships<br />
WHERE wp_term_relationships.object_id = wp_posts.ID AND post_status = &#8216;private&#8217; AND wp_term_relationships.term_taxonomy_id = 3<br />
ORDER BY wp_posts.post_date DESC</p>
<p>which tells this in dreamweaver:<br />
{rsEvents.post_title}</p>
<p>{rsEvents.post_content}</p>
<p>to post all the blogs &#8211; I want to only post 5 blogs, and only the first 2 lines of each blog</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shilin</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1950</link>
		<dc:creator>Shilin</dc:creator>
		<pubDate>Thu, 02 Sep 2010 15:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1950</guid>
		<description>Sorry for the double post; I forgot to use the code format so my linebreak html got eaten. But in the line I&#039;ve added, between the double quotation marks is supposed to be a br.</description>
		<content:encoded><![CDATA[<p>Sorry for the double post; I forgot to use the code format so my linebreak html got eaten. But in the line I&#8217;ve added, between the double quotation marks is supposed to be a br.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shilin</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1949</link>
		<dc:creator>Shilin</dc:creator>
		<pubDate>Wed, 01 Sep 2010 19:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1949</guid>
		<description>Like some of the posters, originally I could not figure out how to preserve line breaks because I actually have very little coding knowledge. But I&#039;ve found the solution here: 

http://mu.wordpress.org/forums/topic/14096

The solution used is str_replace(). I&#039;ve looked through his code, then looked up the php manual and found that chr(13).chr(10) represents a line break. 

So after your line 15:
$blog_content = mysql_result($query_result, 0, &quot;post_content&quot;);  

I&#039;ve added this line: 
$blog_content=str_replace(chr(13).chr(10), &quot;&quot;, $blog_content);

which replaces those two characters with a line break, subsequently properly formatting the post. 

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Like some of the posters, originally I could not figure out how to preserve line breaks because I actually have very little coding knowledge. But I&#8217;ve found the solution here: </p>
<p><a href="http://mu.wordpress.org/forums/topic/14096" rel="nofollow">http://mu.wordpress.org/forums/topic/14096</a></p>
<p>The solution used is str_replace(). I&#8217;ve looked through his code, then looked up the php manual and found that chr(13).chr(10) represents a line break. </p>
<p>So after your line 15:<br />
$blog_content = mysql_result($query_result, 0, &#8220;post_content&#8221;);  </p>
<p>I&#8217;ve added this line:<br />
$blog_content=str_replace(chr(13).chr(10), &#8220;&#8221;, $blog_content);</p>
<p>which replaces those two characters with a line break, subsequently properly formatting the post. </p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reneé Le Vine</title>
		<link>http://www.jamischarles.com/blog/how-to-add-recent-wordpress-posts-on-an-external-html-page/comment-page-2/#comment-1947</link>
		<dc:creator>Reneé Le Vine</dc:creator>
		<pubDate>Fri, 25 Jun 2010 19:02:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.bluebreeze.net/blog/?p=11#comment-1947</guid>
		<description>Hi there. I added your code to my site&#039;s index page so I could display post excerpts there but the post date display is not displaying. The &quot;more&quot; permalink is also not working even though I didn&#039;t change any of the permalink PHP. Plus I decided I did want the display to have some of the blog content, so I took out the &quot;strip the HTML&quot; tag and it didn&#039;t change anything. What should I do?</description>
		<content:encoded><![CDATA[<p>Hi there. I added your code to my site&#8217;s index page so I could display post excerpts there but the post date display is not displaying. The &#8220;more&#8221; permalink is also not working even though I didn&#8217;t change any of the permalink PHP. Plus I decided I did want the display to have some of the blog content, so I took out the &#8220;strip the HTML&#8221; tag and it didn&#8217;t change anything. What should I do?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

