<?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>Keithics Blog and Thoughts &#187; Wordpress</title>
	<atom:link href="http://keithics.com/blog/category/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://keithics.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 16 Jun 2011 06:10:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress Tidbits : Getting the Authors</title>
		<link>http://keithics.com/blog/wordpress/wordpress-tidbits-getting-the-authors</link>
		<comments>http://keithics.com/blog/wordpress/wordpress-tidbits-getting-the-authors#comments</comments>
		<pubDate>Tue, 22 Dec 2009 01:07:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://keithics.com/blog/?p=178</guid>
		<description><![CDATA[As we all know that there is no such function like get_authors() , unlike categories there is get_categories , links have get_bookmarks().]]></description>
			<content:encoded><![CDATA[<p>As we all know that there is no such function like get_authors() , unlike categories there is get_categories , links have get_bookmarks().</p>
<p>Below is a custom function I made, I just modified <a href="http://www.mattvarone.com/wordpress/list-users/" target="_blank">Matt&#8217;s Function</a>.</p>
<p>Anyway, here it is..</p>
<p>&lt;ul&gt;<br />
&lt;?php<br />
$szSort = &#8220;user_id&#8221;;<br />
$aUsersID = $wpdb-&gt;get_col( $wpdb-&gt;prepare(&#8220;SELECT $wpdb-&gt;usermeta.user_id  FROM $wpdb-&gt;usermeta where meta_key=&#8217;wp_user_level&#8217; and  metavalue=&#8217;2&#8242; ORDER BY %s ASC&#8221; , $szSort ));<br />
foreach ( $aUsersID as $iUserID ) :<br />
$user = get_userdata( $iUserID );<br />
echo &#8216;&lt;li&gt;&#8217;;<br />
echo &#8216;&lt;a href=&#8221;index.php?author=&#8217; .$user-&gt;ID.&#8217;&#8221;&gt;&#8217;;<br />
echo ucwords( strtolower( $user-&gt;first_name . &#8216; &#8216; . $user-&gt;last_name ) );<br />
echo &#8216;&lt;/a&gt;&#8217;;<br />
echo &#8216;&lt;/li&gt;&#8217;;<br />
endforeach;<br />
?&gt;<br />
&lt;/ul&gt;</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">As we all know that there is no such function like get_authors() , unlike categories there is get_categories , links have get_bookmarks().</div>
]]></content:encoded>
			<wfw:commentRss>http://keithics.com/blog/wordpress/wordpress-tidbits-getting-the-authors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress get_page() function</title>
		<link>http://keithics.com/blog/php-programming/wordpress-get_page-function</link>
		<comments>http://keithics.com/blog/php-programming/wordpress-get_page-function#comments</comments>
		<pubDate>Wed, 14 Jan 2009 23:15:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[PHP bug]]></category>

		<guid isPermaLink="false">http://keithics.com/blog/?p=211</guid>
		<description><![CDATA[Well this is the first time that I am having a hard time debugging this simple Wordpress get_page() function:
$p = get_page(2); // error : Only variables can be passed by reference
it has to be like this:
$n = 2;
$p = get_page($n);
Getting the title and content is easy..
_e($p-&#62;post_title)
_e($p-&#62;post_content)
I know it sucks but I hope it helps!
]]></description>
			<content:encoded><![CDATA[<p>Well this is the first time that I am having a hard time debugging this simple Wordpress get_page() function:</p>
<p>$p = get_page(2); // error : Only variables can be passed by reference</p>
<p>it has to be like this:</p>
<p>$n = 2;<br />
$p = get_page($n);</p>
<p>Getting the title and content is easy..</p>
<p>_e($p-&gt;post_title)</p>
<p>_e($p-&gt;post_content)</p>
<p>I know it sucks but I hope it helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://keithics.com/blog/php-programming/wordpress-get_page-function/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Get Articles from a specific cagetory in Wordpress</title>
		<link>http://keithics.com/blog/php-programming/get-articles-from-a-specific-cagetory-in-wordpress</link>
		<comments>http://keithics.com/blog/php-programming/get-articles-from-a-specific-cagetory-in-wordpress#comments</comments>
		<pubDate>Tue, 28 Oct 2008 15:03:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Freelancing]]></category>

		<guid isPermaLink="false">http://keithics.com/blog/?p=84</guid>
		<description><![CDATA[After googling and not found any code, I made my own script to get articles from wordpress with a specific category.

Category = term_taxonomy_id // you can see it in the database table called wp_term_taxonomy]]></description>
			<content:encoded><![CDATA[<p>After googling and not found any code, I made my own script to get articles from wordpress with a specific category.</p>
<p>Category = term_taxonomy_id // you can see it in the database table called wp_term_taxonomy</p>
<p><a href="http://keithics.com/blog/wp-content/uploads/2008/10/wordpress.gif"><img class="alignnone size-full wp-image-85" title="wordpress" src="http://keithics.com/blog/wp-content/uploads/2008/10/wordpress.gif" alt="" width="499" height="208" /></a></p>
<p>Here is the code:</p>
<p>[sourcecode language='php']</p>
<p>//////////////////////////////////////////////////////////////////////</p>
<p>$conn = mysql_connect(&#8216;localhost&#8217;,'root&#8217;,&#8221;);<br />
mysql_select_db(&#8220;keithics&#8221;,$conn) or die(mysql_error());</p>
<p>if (!$conn) {<br />
die(&#8216;Error!!&#8211;> &#8216; . mysql_error()); // if there&#8217;s an error, e.g. wrong password or username.<br />
}</p>
<p>$sql = &#8220;Select wp_posts.* ,wp_term_relationships.* from `wp_posts`,`wp_term_relationships` where wp_posts.post_status = &#8216;publish&#8217; and wp_term_relationships.term_taxonomy_id   = 7 and wp_posts.ID = wp_term_relationships.object_id order by rand() limit 5 &#8220;;</p>
<p>$result = mysql_query($sql) or die(mysql_error());<br />
while($row =  mysql_fetch_array($result))<br />
{<br />
echo &#8216;<a href="'.$site.'blog/article/'.$row['post_name'].'/'.$row['ID'].'/">&#8216;.$row['post_title'].&#8217;</a>&#8216;;<br />
}</p>
<p>[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://keithics.com/blog/php-programming/get-articles-from-a-specific-cagetory-in-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Posts from Wordpress to an External Page</title>
		<link>http://keithics.com/blog/php-programming/get-posts-from-wordpress-to-an-external-page</link>
		<comments>http://keithics.com/blog/php-programming/get-posts-from-wordpress-to-an-external-page#comments</comments>
		<pubDate>Tue, 28 Oct 2008 13:38:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Freelancing]]></category>

		<guid isPermaLink="false">http://keithics.com/blog/?p=66</guid>
		<description><![CDATA[Below will get the All articles from Wordpress Database to an external file and display in random order.Also, it depends on how you customized your "Permalink Structure". Sample below has "/article/%postname%/%post_id%/". I am using the same code on my footer!]]></description>
			<content:encoded><![CDATA[<p>Below will get the All articles from Wordpress Database to an external file and display in random order.Also, it depends on how you customized your &#8220;Permalink Structure&#8221;. Sample below has &#8220;/article/%postname%/%post_id%/&#8221;. I am using the same code on my footer!</p>
<p>[sourcecode language='php']</p>
<p>//////////////////////////////////////////////////////////////////////</p>
<p>$conn = mysql_connect(&#8216;localhost&#8217;,'root&#8217;,&#8221;);<br />
mysql_select_db(&#8220;keithics&#8221;,$conn) or die(mysql_error());</p>
<p>if (!$conn) {<br />
die(&#8216;Error!!&#8211;> &#8216; . mysql_error()); // if there&#8217;s an error, e.g. wrong password or username.<br />
}</p>
<p>$sql = &#8220;Select * from `wp_posts` where post_status = &#8216;publish&#8217; order by rand() limit 5 &#8220;;</p>
<p>$result = mysql_query($sql) or die(mysql_error());</p>
<p>while($row =  mysql_fetch_array($result))<br />
{<br />
echo &#8216;<a href="'.$site.'blog/article/'.$row['post_name'].'/'.$row['ID'].'/">&#8216;.$row['post_title'].&#8217;</a>&#8216;;<br />
}</p>
<p>[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://keithics.com/blog/php-programming/get-posts-from-wordpress-to-an-external-page/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

