<?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 Implement Ajax in WordPress Themes</title>
	<atom:link href="http://www.1stwebdesigner.com/wordpress/implement-ajax-wordpress-themes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/</link>
	<description>1stwebdesigner is a design blog dedicated to bloggers, freelancers, web-developers and designers. Topics focus on web design and inspirational articles.</description>
	<lastBuildDate>Mon, 13 Feb 2012 05:57:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: carlos victor</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-181015</link>
		<dc:creator>carlos victor</dc:creator>
		<pubDate>Fri, 10 Feb 2012 08:00:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-181015</guid>
		<description>Great tutorial, man! Like others said, I also search in many websites and could not understand how to use ajax in wordpress. Congratulations!
ps: I had the same problem of the user thinkdj. So, would be nice if you could fix in the tutorial the name of the function.</description>
		<content:encoded><![CDATA[<p>Great tutorial, man! Like others said, I also search in many websites and could not understand how to use ajax in wordpress. Congratulations!<br />
ps: I had the same problem of the user thinkdj. So, would be nice if you could fix in the tutorial the name of the function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veronica</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-180537</link>
		<dc:creator>Veronica</dc:creator>
		<pubDate>Thu, 09 Feb 2012 04:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-180537</guid>
		<description>This was a great tutorial. I&#039;ve read ebooks, tutorials, etc. on WP ajax and was about to give up when I stumbled on your tutorial. It was straight forward and I was able to finish my chained select boxes based on custom post type meta data with no problems. Thank you!</description>
		<content:encoded><![CDATA[<p>This was a great tutorial. I&#8217;ve read ebooks, tutorials, etc. on WP ajax and was about to give up when I stumbled on your tutorial. It was straight forward and I was able to finish my chained select boxes based on custom post type meta data with no problems. Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Janvier</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-176481</link>
		<dc:creator>Janvier</dc:creator>
		<pubDate>Tue, 31 Jan 2012 10:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-176481</guid>
		<description>Great piece of code to start from. However, I noticed you have a lot of typos which leads to all kinds of errors. If you could look into that, it&#039;s be fantastic! I got it working and I appreciate the efforts indeed</description>
		<content:encoded><![CDATA[<p>Great piece of code to start from. However, I noticed you have a lot of typos which leads to all kinds of errors. If you could look into that, it&#8217;s be fantastic! I got it working and I appreciate the efforts indeed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Janvier</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-176479</link>
		<dc:creator>Janvier</dc:creator>
		<pubDate>Tue, 31 Jan 2012 10:52:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-176479</guid>
		<description>To use a different  taxonomy, on the get_categories(&#039;child_of=&#039;.$_POST[&#039;main_catid&#039;].&#039;&amp;hide_empty=0&#039;);   add &lt;i&gt;taxonomy=YOURTAXONOMY&lt;/i&gt; where  YOURTAXONOMY is the name of the taxonomy you want to use. 

All becomes &lt;b&gt;get_categories(&#039;child_of=&#039;.$_POST[&#039;main_catid&#039;].&#039;&amp;hide_empty=0&amp;taxonomy=YOURTAXONOMY&#039;);&lt;/b&gt;

Likewise, change &lt;i&gt; wp_dropdown_categories(&#039;show_count=0&amp;selected=-1&amp;hierarchical=1&amp;depth=1&amp;hide_empty=0&amp;exclude=1&amp;show_option_none=Main Categories&amp;name=main_cat&#039;); &lt;/i&gt;  TO &lt;b&gt;wp_dropdown_categories(&#039;show_count=0&amp;selected=-1&amp;hierarchical=1&amp;depth=1&amp;hide_empty=0&amp;exclude=1&amp;show_option_none=Main Categories&amp;name=main_cat&amp;taxonomy=YOURTAXONOMY&#039;);&lt;/b&gt;</description>
		<content:encoded><![CDATA[<p>To use a different  taxonomy, on the get_categories(&#8216;child_of=&#8217;.$_POST['main_catid'].&#8217;&amp;hide_empty=0&#8242;);   add <i>taxonomy=YOURTAXONOMY</i> where  YOURTAXONOMY is the name of the taxonomy you want to use. </p>
<p>All becomes <b>get_categories(&#8216;child_of=&#8217;.$_POST['main_catid'].&#8217;&amp;hide_empty=0&amp;taxonomy=YOURTAXONOMY&#8217;);</b></p>
<p>Likewise, change <i> wp_dropdown_categories(&#8216;show_count=0&amp;selected=-1&amp;hierarchical=1&amp;depth=1&amp;hide_empty=0&amp;exclude=1&amp;show_option_none=Main Categories&amp;name=main_cat&#8217;); </i>  TO <b>wp_dropdown_categories(&#8216;show_count=0&amp;selected=-1&amp;hierarchical=1&amp;depth=1&amp;hide_empty=0&amp;exclude=1&amp;show_option_none=Main Categories&amp;name=main_cat&amp;taxonomy=YOURTAXONOMY&#8217;);</b></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thinkdj</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-175521</link>
		<dc:creator>thinkdj</dc:creator>
		<pubDate>Sat, 28 Jan 2012 14:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-175521</guid>
		<description>On the last Code Snippet block, it should be 

add_action(&#039;wp_ajax_my_special_action&#039;, &#039;implement_ajax&#039;);
add_action(&#039;wp_ajax_nopriv_my_special_action&#039;, &#039;implement_ajax&#039;);//for users that are not logged in.

and not wp_ajax_my_special_ajax_call. Took me a while to find out why it was returning 0 always.</description>
		<content:encoded><![CDATA[<p>On the last Code Snippet block, it should be </p>
<p>add_action(&#8216;wp_ajax_my_special_action&#8217;, &#8216;implement_ajax&#8217;);<br />
add_action(&#8216;wp_ajax_nopriv_my_special_action&#8217;, &#8216;implement_ajax&#8217;);//for users that are not logged in.</p>
<p>and not wp_ajax_my_special_ajax_call. Took me a while to find out why it was returning 0 always.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saul</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-145907</link>
		<dc:creator>Saul</dc:creator>
		<pubDate>Tue, 06 Dec 2011 20:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-145907</guid>
		<description>I have the follow Error: ¿Could you help me please?
Fatal error: Call to undefined function add_action() in /httpdocs/site/wp-includes/functions.php on line 4569
I have installed the Wordpress Version 3.2.1

My Code:
function implement_ajax() {
if(isset($_POST[&#039;estado_id&#039;]))
			{
			$pages=  get_pages(&#039;title_li=&amp;sort_column=menu_order&amp;parent=&#039;.$_POST[&#039;estado_id&#039;].&#039;&amp;child_of=&#039;.$_POST[&#039;estado_id&#039;].&#039;&amp;hierarchical=0&#039;);
			  foreach ($pages as $pagg) {
				$option = &#039;ID ) . &#039;&quot;&gt;&#039;;;
				$option .= $pag-&gt;post_title;
				$option .= &#039;&#039;;
			  }

			  echo &#039;Scegli...&#039;.$option;
			die();
			} // end if
}
add_action(&#039;wp_ajax_my_special_action&#039;, &#039;implement_ajax&#039;);
add_action(&#039;wp_ajax_nopriv_my_special_action&#039;, &#039;implement_ajax&#039;);</description>
		<content:encoded><![CDATA[<p>I have the follow Error: ¿Could you help me please?<br />
Fatal error: Call to undefined function add_action() in /httpdocs/site/wp-includes/functions.php on line 4569<br />
I have installed the WordPress Version 3.2.1</p>
<p>My Code:<br />
function implement_ajax() {<br />
if(isset($_POST['estado_id']))<br />
			{<br />
			$pages=  get_pages(&#8216;title_li=&amp;sort_column=menu_order&amp;parent=&#8217;.$_POST['estado_id'].&#8217;&amp;child_of=&#8217;.$_POST['estado_id'].&#8217;&amp;hierarchical=0&#8242;);<br />
			  foreach ($pages as $pagg) {<br />
				$option = &#8216;ID ) . &#8216;&#8221;&gt;&#8217;;;<br />
				$option .= $pag-&gt;post_title;<br />
				$option .= &#8221;;<br />
			  }</p>
<p>			  echo &#8216;Scegli&#8230;&#8217;.$option;<br />
			die();<br />
			} // end if<br />
}<br />
add_action(&#8216;wp_ajax_my_special_action&#8217;, &#8216;implement_ajax&#8217;);<br />
add_action(&#8216;wp_ajax_nopriv_my_special_action&#8217;, &#8216;implement_ajax&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beratz Gashi</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-145004</link>
		<dc:creator>Beratz Gashi</dc:creator>
		<pubDate>Tue, 06 Dec 2011 00:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-145004</guid>
		<description>if somebody can post a video tutorial of this will help us more to beginners</description>
		<content:encoded><![CDATA[<p>if somebody can post a video tutorial of this will help us more to beginners</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alvin</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-96716</link>
		<dc:creator>Alvin</dc:creator>
		<pubDate>Wed, 24 Aug 2011 11:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-96716</guid>
		<description>Hi super tutorial biut how to implement this in an existing theme ?
I have found the following code in my theme , but what should be modified ?
I am a total noob in php :(
----------------------------------------------------------------------------------------------------------------
&lt;?php
	$select = wp_dropdown_categories( &#039;show_option_none=Select&amp;show_count=0&amp;orderby=name&amp;echo=0&amp;hide_empty=0&#039; );
	$select = preg_replace( &#039;&#124;&#124;i&#039;, &#039;&#039;, $select );
	echo $select;
	?&gt;
	
----------------------------------------------------------------------------------------------------------------

Hope someone can help me out here!

Gr. Alvin</description>
		<content:encoded><![CDATA[<p>Hi super tutorial biut how to implement this in an existing theme ?<br />
I have found the following code in my theme , but what should be modified ?<br />
I am a total noob in php :(<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
&lt;?php<br />
	$select = wp_dropdown_categories( &#039;show_option_none=Select&amp;show_count=0&amp;orderby=name&amp;echo=0&amp;hide_empty=0&#039; );<br />
	$select = preg_replace( &#039;||i&#8217;, &#8221;, $select );<br />
	echo $select;<br />
	?&gt;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Hope someone can help me out here!</p>
<p>Gr. Alvin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Take</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-96007</link>
		<dc:creator>Take</dc:creator>
		<pubDate>Sat, 20 Aug 2011 11:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-96007</guid>
		<description>How i can add this function in some other php file, not in admin-ajax.php, can i add in functiones.php inside my theme?</description>
		<content:encoded><![CDATA[<p>How i can add this function in some other php file, not in admin-ajax.php, can i add in functiones.php inside my theme?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad Adnan</title>
		<link>http://www.1stwebdesigner.com/css/implement-ajax-wordpress-themes/comment-page-2/#comment-93205</link>
		<dc:creator>Muhammad Adnan</dc:creator>
		<pubDate>Thu, 04 Aug 2011 21:44:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.1stwebdesigner.com/?p=8219#comment-93205</guid>
		<description>function my_special_ajax_call() {
if(isset($_POST[&#039;main_catid&#039;]))
			{
				global $wpdb;
			$categories =  get_categories(&#039;child_of=&#039;.$_POST[&#039;main_catid&#039;].&#039;&amp;show_count=1&amp;hide_empty=0&#039;); 
			if(count($categories) &gt; 0){
			  foreach ($categories as $cati) {
				$option .= &#039;term_id.&#039;&quot;&gt;&#039;;
				$option .= $cati-&gt;cat_name;
				//$option .= &#039; (&#039;.$cati-&gt;category_count.&#039;)&#039;;
				$option .= &#039;&#039;;
			  }}else{
			
			$option = &#039;None&#039;;
				  
			}
			  
			  //
			echo $option;  
			die();
			} // end if
}
add_action(&#039;wp_ajax_my_special_ajax_call&#039;, &#039;my_special_ajax_call&#039;);
add_action(&#039;wp_ajax_nopriv_my_special_ajax_call&#039;, &#039;my_special_ajax_call&#039;);//for users that are not logged in.</description>
		<content:encoded><![CDATA[<p>function my_special_ajax_call() {<br />
if(isset($_POST['main_catid']))<br />
			{<br />
				global $wpdb;<br />
			$categories =  get_categories(&#8216;child_of=&#8217;.$_POST['main_catid'].&#8217;&amp;show_count=1&amp;hide_empty=0&#8242;);<br />
			if(count($categories) &gt; 0){<br />
			  foreach ($categories as $cati) {<br />
				$option .= &#8216;term_id.&#8217;&#8221;&gt;&#8217;;<br />
				$option .= $cati-&gt;cat_name;<br />
				//$option .= &#8216; (&#8216;.$cati-&gt;category_count.&#8217;)';<br />
				$option .= &#8221;;<br />
			  }}else{</p>
<p>			$option = &#8216;None&#8217;;</p>
<p>			}</p>
<p>			  //<br />
			echo $option;<br />
			die();<br />
			} // end if<br />
}<br />
add_action(&#8216;wp_ajax_my_special_ajax_call&#8217;, &#8216;my_special_ajax_call&#8217;);<br />
add_action(&#8216;wp_ajax_nopriv_my_special_ajax_call&#8217;, &#8216;my_special_ajax_call&#8217;);//for users that are not logged in.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

