<?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: Adding and using custom user profile fields</title>
	<atom:link href="http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields/feed" rel="self" type="application/rss+xml" />
	<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields</link>
	<description>Life, Blogging, and WordPress</description>
	<lastBuildDate>Fri, 10 Feb 2012 12:19:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Natalya</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-597197</link>
		<dc:creator>Natalya</dc:creator>
		<pubDate>Wed, 08 Feb 2012 03:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-597197</guid>
		<description>Hi,

I am trying to add 2 custom fields to my user profile:

&lt;pre&gt;&lt;code&gt;add_action( &#039;show_user_profile&#039;, &#039;extra_user_profile_fields&#039; );
add_action( &#039;edit_user_profile&#039;, &#039;extra_user_profile_fields&#039; );
 
function extra_user_profile_fields( $user ) { ?&gt;

&lt;textarea rows=&quot;5&quot; cols=&quot;5&quot; name=&quot;notes&quot; id=&quot;notes&quot; value=&quot;ID ) ); ?&gt;&quot; &gt;

  &lt;option ID ) ); ?&gt;&gt;Private
  &lt;option ID ) ); ?&gt;&gt;Public
&lt;?php }
 
add_action( &#039;personal_options_update&#039;, &#039;my_save_extra_profile_fields&#039; );
add_action( &#039;edit_user_profile_update&#039;, &#039;my_save_extra_profile_fields&#039; );

function my_save_extra_profile_fields( $user_id ) {

	if ( !current_user_can( &#039;edit_user&#039;, $user_id ) )
		return false;

	update_usermeta( $user_id, &#039;status&#039;, $_POST[&#039;status&#039;] );
	update_usermeta( $user_id, &#039;notes&#039;, $_POST[&#039;notes&#039;] );
}&lt;/code&gt;&lt;/pre&gt;

for some reason when I click update profile the entered information doesn&#039;t stay. However it does work with input type.  Could you help me to save the entered information for select and textarea type fields?

thanks,
natalya</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am trying to add 2 custom fields to my user profile:</p>
<pre><code>add_action( 'show_user_profile', 'extra_user_profile_fields' );
add_action( 'edit_user_profile', 'extra_user_profile_fields' );

function extra_user_profile_fields( $user ) { ?&gt;

&lt;textarea rows=&quot;5&quot; cols=&quot;5&quot; name=&quot;notes&quot; id=&quot;notes&quot; value=&quot;ID ) ); ?&gt;" &gt;

  &lt;option ID ) ); ?&gt;&gt;Private
  &lt;option ID ) ); ?&gt;&gt;Public
&lt;?php }

add_action( &#039;personal_options_update&#039;, &#039;my_save_extra_profile_fields&#039; );
add_action( &#039;edit_user_profile_update&#039;, &#039;my_save_extra_profile_fields&#039; );

function my_save_extra_profile_fields( $user_id ) {

	if ( !current_user_can( &#039;edit_user&#039;, $user_id ) )
		return false;

	update_usermeta( $user_id, &#039;status&#039;, $_POST[&#039;status&#039;] );
	update_usermeta( $user_id, &#039;notes&#039;, $_POST[&#039;notes&#039;] );
}</code></pre>
<p>for some reason when I click update profile the entered information doesn&#039;t stay. However it does work with input type.  Could you help me to save the entered information for select and textarea type fields?</p>
<p>thanks,<br />
natalya</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-586709</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Wed, 01 Feb 2012 14:08:03 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-586709</guid>
		<description>thxs man i will use it in future for own site!!!</description>
		<content:encoded><![CDATA[<p>thxs man i will use it in future for own site!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suraj Shakya</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-580677</link>
		<dc:creator>Suraj Shakya</dc:creator>
		<pubDate>Sat, 28 Jan 2012 09:16:27 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-580677</guid>
		<description>Hi, 

Your tutorial is really helpful. Currently i&#039;m using the plugin &quot;Cimy User Extra Fields&quot;. But i want the repeating field to add user achievements which had icon and textarea for each achievement.

Can you help me how to implement it?

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Your tutorial is really helpful. Currently i&#8217;m using the plugin &#8220;Cimy User Extra Fields&#8221;. But i want the repeating field to add user achievements which had icon and textarea for each achievement.</p>
<p>Can you help me how to implement it?</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denis</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-571777</link>
		<dc:creator>Denis</dc:creator>
		<pubDate>Sun, 22 Jan 2012 07:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-571777</guid>
		<description>Thank you Justin for this great tutorial!
Also thank&#039;s a lot to Chris Silverman who noticed that update_usermeta has been deprecated since 3.0 and update_user_meta should be used instead.

Works perfectly with 3.3.1.

Thank&#039;s again!</description>
		<content:encoded><![CDATA[<p>Thank you Justin for this great tutorial!<br />
Also thank&#8217;s a lot to Chris Silverman who noticed that update_usermeta has been deprecated since 3.0 and update_user_meta should be used instead.</p>
<p>Works perfectly with 3.3.1.</p>
<p>Thank&#8217;s again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-562795</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 14 Jan 2012 04:10:50 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-562795</guid>
		<description>Hello,

I have learned from your and other websites about how to add custom fields to the wordpress profile page.  Is there a way to place them between the &quot;Biographical Info&quot; text box and the &quot;Change password&quot; field?  I want to add 7 custom fileds to the profile page, but want them placed in this exact spot.  How can I do this?  Is this something that may require javascript?  Please advise.  Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I have learned from your and other websites about how to add custom fields to the wordpress profile page.  Is there a way to place them between the &#8220;Biographical Info&#8221; text box and the &#8220;Change password&#8221; field?  I want to add 7 custom fileds to the profile page, but want them placed in this exact spot.  How can I do this?  Is this something that may require javascript?  Please advise.  Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suzette</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-562420</link>
		<dc:creator>Suzette</dc:creator>
		<pubDate>Fri, 13 Jan 2012 20:39:49 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-562420</guid>
		<description>Thank you, thank you, thank you for this. I have been searching the internet for almost a week for this solution for my members listing wordpress site. For someone who doesn&#039;t know much about php, your directions were very clear and easy to follow/ implement. Good Job!!!</description>
		<content:encoded><![CDATA[<p>Thank you, thank you, thank you for this. I have been searching the internet for almost a week for this solution for my members listing wordpress site. For someone who doesn&#8217;t know much about php, your directions were very clear and easy to follow/ implement. Good Job!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-553494</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 06 Jan 2012 17:42:18 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-553494</guid>
		<description>sorry it keeps erasing, tried to surround it with tags

&lt;pre&gt;&lt;code&gt;the_author_meta  (&#039;location&#039;, $author   -&gt;post_author);   
the_author_meta  (&#039;program&#039;, $author   -&gt; post_author);&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>sorry it keeps erasing, tried to surround it with tags</p>
<pre><code>the_author_meta  ('location', $author   -&gt;post_author);
the_author_meta  ('program', $author   -&gt; post_author);</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-553490</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 06 Jan 2012 17:39:34 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-553490</guid>
		<description>So we had a developer create wordpress blog who i believe used this exact code to create profile fields for our users, I am trying to take this now a step further. The two custom fields we have are Location and Program, where the user can indicate where they are and what program they are with. I am trying to create a page that filters on these two fields, so for all the users who have Rome, Italy it will return all the bloggers who have this. Or if someone clicks on a Program title it will filter all the users who have that program name. Can anyone help me get started on how to accomplish this?

The two fields currently just pull the text:

Any help would be most appreciated.</description>
		<content:encoded><![CDATA[<p>So we had a developer create wordpress blog who i believe used this exact code to create profile fields for our users, I am trying to take this now a step further. The two custom fields we have are Location and Program, where the user can indicate where they are and what program they are with. I am trying to create a page that filters on these two fields, so for all the users who have Rome, Italy it will return all the bloggers who have this. Or if someone clicks on a Program title it will filter all the users who have that program name. Can anyone help me get started on how to accomplish this?</p>
<p>The two fields currently just pull the text:</p>
<p>Any help would be most appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nikhil</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-550907</link>
		<dc:creator>nikhil</dc:creator>
		<pubDate>Wed, 04 Jan 2012 18:34:26 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-550907</guid>
		<description>Really Cool description. Thank you for sharing it.</description>
		<content:encoded><![CDATA[<p>Really Cool description. Thank you for sharing it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Silverman</title>
		<link>http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields#comment-549051</link>
		<dc:creator>Chris Silverman</dc:creator>
		<pubDate>Tue, 03 Jan 2012 20:45:55 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1796#comment-549051</guid>
		<description>Thanks, Justin, this was exactly what I needed. Only problem was that I was using a textarea instead of an input field, which broke it. Tiago&#039;s comment above really helped:

http://pastebin.com/KwSD04XE

Also, I noticed that update_usermeta has been deprecated since 3.0. The new function seems to be identical, just with an underscore between user and meta:

http://codex.wordpress.org/Function_Reference/update_user_meta</description>
		<content:encoded><![CDATA[<p>Thanks, Justin, this was exactly what I needed. Only problem was that I was using a textarea instead of an input field, which broke it. Tiago&#8217;s comment above really helped:</p>
<p><a href="http://pastebin.com/KwSD04XE" rel="nofollow">http://pastebin.com/KwSD04XE</a></p>
<p>Also, I noticed that update_usermeta has been deprecated since 3.0. The new function seems to be identical, just with an underscore between user and meta:</p>
<p><a href="http://codex.wordpress.org/Function_Reference/update_user_meta" rel="nofollow">http://codex.wordpress.org/Function_Reference/update_user_meta</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

