<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Wordpress Tips</title>
	
	<link>http://tipsforwordpress.com</link>
	<description>Tips and Tricks for Wordpress</description>
	<lastBuildDate>Tue, 24 Aug 2010 19:16:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/tipsforwordpress" /><feedburner:info uri="tipsforwordpress" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Make Network WordPress Private Site Wide</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/yPKRgpQ_mT4/</link>
		<comments>http://tipsforwordpress.com/wordpress/make-network-wordpress-private-site-wide/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 19:14:50 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=114</guid>
		<description><![CDATA[I am creating an Intranet wordPress site for the company that I work for. It has different sections for each part of the company. When you login to the site it will show you everything that you have access to, &#8230; <a href="http://tipsforwordpress.com/wordpress/make-network-wordpress-private-site-wide/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am creating an Intranet wordPress site for the company that I work for. It has different sections for each part of the company. When you login to the site it will show you everything that you have access to, Graphs, Charts, Personal To Do&#8217;s. This is all using WordPress Multi Network, and it is slowly coming along and now I wanted to make it private. This is a two fold thing, We want you to be logged in to view whats going on, and we don&#8217;t want any outsiders seeing what we are doing. I could put this on a computer her in the office and host it internally, but thats no fun, We have a lot of satellite working and are often working off our devices. So thats why i made it possible to access anywhere.</p>
<p>Anyways, We wanted to make it so you had to login to be able to see anything. Essentially making it private. Luckily there is already a plugin out there and it is very small, and works magical to our needs, <a href="http://wordpress.org/extend/plugins/private-wp/">Private WP</a>. But  then I have to add it to every blog we have and activate it. But thankfully wordPress is smart and made a mu-plugins folder in wp-content. Whatever plugin you add in there gets activated and added to every blog in your install.<br />
<a href="http://tipsforwordpress.com/images/2010/08/Screen-shot-2010-08-24-at-12.04.46-PM.png"><img class="alignright size-full wp-image-115" title="Make Network WordPress Private Site Wide" src="http://tipsforwordpress.com/images/2010/08/Screen-shot-2010-08-24-at-12.04.46-PM.png" alt="Make Network WordPress Private Site Wide" width="510" height="277" /></a></p>
<p>All you have to do is download the plugin and upload it to that folder and it is activated site wide.</p>
<p>This is the plugin, which is exactly how I would have done it.</p>
<p><code><br />
function private_wp() {<br />
  if (!is_user_logged_in()) {<br />
    auth_redirect();<br />
  }<br />
}</p>
<p>add_action('get_header', 'private_wp');<br />
</code></p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/yPKRgpQ_mT4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/make-network-wordpress-private-site-wide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/make-network-wordpress-private-site-wide/</feedburner:origLink></item>
		<item>
		<title>Code Injection</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/XA_UIWNWST0/</link>
		<comments>http://tipsforwordpress.com/php/code-injection/#comments</comments>
		<pubDate>Sat, 22 May 2010 21:22:22 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[code injection]]></category>
		<category><![CDATA[wordpress code injection]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=101</guid>
		<description><![CDATA[So, I found out this weekend that I got all my sites injected with code. I tried deleting it and it just wouldn&#8217;t go away. It had injected itself into every plugin in the plugin folder. I tried removing the &#8230; <a href="http://tipsforwordpress.com/php/code-injection/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, I found out this weekend that I got all my sites injected with code. I tried deleting it and it just wouldn&#8217;t go away. It had injected itself into every plugin in the plugin folder. I tried removing the code, but it was still showing up in the footer of my theme. So, I just tried to do some more detective work on how to remove it. Thank god for google, I found the answer at stack overflow which is a great resource for doing this sort of thing. I found a code that scans files and looks for  the code injection if it uses base64 injection. Anyways, since i have multiple domains in my host i changed one thing.<br />
<code><br />
This script will clean the malware from this attack:</p>
<p><?php</p>
<p>$dir = "./";</p>
<p>$rmcode = `find $dir -name "*.php" -type f |xargs sed -i 's#<?php /\*\*/ eval(base64_decode("aWY.*?>##g' 2>&#038;1`;<br />
echo "Malware removed.<br />\n";<br />
$emptyline = `find $dir -name "*.php" -type f | xargs sed -i '/./,$!d' 2>&#038;1`;<br />
echo "Empty lines removed.<br />\n";<br />
?><br />
<br />
Completed.</code></p>
<p>If you upload this to the root of your website and open it up in the browser it will do as it says. I changed the $dir = &#8220;./&#8221;; to $dir = &#8220;./../&#8221;; so it went through all my websites at the same time. Took about 30 seconds or so. And it removed the injection from all my sites. Great</p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/XA_UIWNWST0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/php/code-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/php/code-injection/</feedburner:origLink></item>
		<item>
		<title>Disable New User Email Notifications</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/Drf_Ap9iGzg/</link>
		<comments>http://tipsforwordpress.com/wordpress/disable-new-user-email-notifications/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 22:48:31 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[new user]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=98</guid>
		<description><![CDATA[This plugin will disable emails about new users who register on your blog. It is a very simple plugin that just changes what happens when new users registers. You can download this plugin here. I am going to be submitting &#8230; <a href="http://tipsforwordpress.com/wordpress/disable-new-user-email-notifications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This plugin will disable emails about new users who register on your blog. It is a very simple plugin that just changes what happens when new users registers. </p>
<p>You can download this plugin <a href="http://tipsforwordpress.com/download/disable-new-user-notifications.zip">here</a>.</p>
<p>I am going to be submitting this plugin to the repository, I don&#8217;t suspect any updates to this anytime soon. But if there are, it will be there. </p>
<p><code><br />
<?php<br />
/*<br />
Plugin Name: Disable new user email notifications<br />
Plugin URI: http://www.tipsforwordpress.com<br />
Description: Disables email notifications of new users registered on your blog<br />
Author URI: http://westondeboer.com<br />
Version: 1.0<br />
*/</p>
<p>if ( !function_exists('wp_new_user_notification') ) :<br />
function wp_new_user_notification($user_id, $plaintext_pass = '') {<br />
	$user = new WP_User($user_id);</p>
<p>	$user_login = stripslashes($user->user_login);<br />
	$user_email = stripslashes($user->user_email);</p>
<p>	// The blogname option is escaped with esc_html on the way into the database in sanitize_option<br />
	// we want to reverse this for the plain text arena of emails.<br />
	$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);</p>
<p>	if ( empty($plaintext_pass) )<br />
		return;</p>
<p>	$message  = sprintf(__('Username: %s'), $user_login) . "\r\n";<br />
	$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";<br />
	$message .= wp_login_url() . "\r\n";</p>
<p>	wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);</p>
<p>}<br />
endif;<br />
?><br />
</code></p>
<p>With this plugin, I have learned so much about pluggable.php and am so excited about it! Things I didn&#8217;t know before.</p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/Drf_Ap9iGzg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/disable-new-user-email-notifications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/disable-new-user-email-notifications/</feedburner:origLink></item>
		<item>
		<title>Custom Post Types in WordPress 3.0</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/5QRnu4XbJAc/</link>
		<comments>http://tipsforwordpress.com/wordpress/custom-post-types-in-wordpress-3-0/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 20:20:18 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[custom post type]]></category>
		<category><![CDATA[post type]]></category>
		<category><![CDATA[register_post_type]]></category>
		<category><![CDATA[wordpress 3.0]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=89</guid>
		<description><![CDATA[This has been something that I have been looking forward to for a very long time. With these options, wordpress mu and buddypress, WordPress is really a cms/blogging software to be reckoned with. Clients get confused when you install wordpress &#8230; <a href="http://tipsforwordpress.com/wordpress/custom-post-types-in-wordpress-3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://tipsforwordpress.com/images/2010/03/custom-post-wordpress.gif" alt="" title="custom-post-wordpress" width="162" height="418" class="alignright size-full wp-image-92" /><br />
This has been something that I have been looking forward to for a very long time. With these options, wordpress mu and buddypress, WordPress is really a cms/blogging software to be reckoned with. </p>
<p>Clients get confused when you install wordpress as a cms for them and they see add a new post, they always get confused with that. With this new feature where it says add a new client, or add new business. Clients will be able to understand easily what they need to do. This will also add the ability to organize much easier within categories and categories within categories.</p>
<p>To add a custom post type in wordpress 3.0 this would go into either a plugin or the functions.php file in your theme directory:</p>
<p><code><br />
// This function is where the magic happens<br />
function post_type_gallery() {</p>
<p>// this is where we say the post type<br />
  register_post_type( 'gallery',</p>
<p>// This section tells wordpress what to show when they go to add Gallery. This will only show the subject box, the body box and the publish box.<br />
    array( 'label' => __('Gallery'), 'public' => true, 'show_ui' => true) ) );<br />
}</p>
<p>// This action shows the above function in the WordPress Dashboard<br />
add_action('init', 'post_type_gallery');<br />
</code></p>
<p>With that you will have a custom post screen, Way easier than it was before! Everything posted in this gallery section will also only appear in the gallery edit posts section. It should look this this below:</p>
<p><a href="http://tipsforwordpress.com/images/2010/03/custom-post-write-screen.gif"><img src="http://tipsforwordpress.com/images/2010/03/custom-post-write-screen-514x205.gif" alt="" title="custom-post-write-screen" width="514" height="205" class="alignright size-medium wp-image-91" /></a></p>
<p>Next will be how to add a custom field to this custom post. It is the same way as before, just a little bit of added code into the register_post_type. </p>
<p><a href="http://wpengineer.com/impressions-of-custom-post-type/">WP Engineer</a> goes a little more in detail about custom post types. More in detail about how to display certain boxes and what not. Definitely worth a read.</p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/5QRnu4XbJAc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/custom-post-types-in-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/custom-post-types-in-wordpress-3-0/</feedburner:origLink></item>
		<item>
		<title>Add Link to Favorites Drop Down</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/r4E0Fcqj_CM/</link>
		<comments>http://tipsforwordpress.com/wordpress/add-link-to-favorites-drop-down/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 19:36:20 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=85</guid>
		<description><![CDATA[I saw a post today about making a quick action button always there that required you to edit the core wordpress files. This made me cringe a little bit, I have only had to do this once for a wordpress &#8230; <a href="http://tipsforwordpress.com/wordpress/add-link-to-favorites-drop-down/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-86" title="wordpress quick actions" src="http://tipsforwordpress.com/images/2010/03/quick-actions.jpg" alt="" width="216" height="193" /> I saw a <a href="http://digwp.com/2010/03/change-quick-action-button/">post</a> today about making a quick action button always there that required you to edit the core wordpress files. This made me cringe a little bit, I have only had to do this once for a wordpress install. And I always forget when I upgrade and the site gets borked. So I decided to steal a function from wp cache that does this exact same thing. </p>
<p>I have no uses for this as I can navigate to any area that I want to, pretty easily. Just putting it out there for other plugin/theme developers.  </p>
<p><code><br />
function my_favorite_action( $actions ) {</p>
<p>	$actions[ wp_nonce_url( 'edit-comments.php', 'wp-cache' ) ] = array( __( 'Manage Comments' ), 'manage_options' );</p>
<p>	return $actions;<br />
}<br />
add_filter( 'favorite_actions', 'my_favorite_action' );<br />
</code></p>
<p>The only section that you need to edit is the edit-comments.php, and just point that to where you want the link to go. And the Manage Comments will be the text that is displayed. </p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/r4E0Fcqj_CM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/add-link-to-favorites-drop-down/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/add-link-to-favorites-drop-down/</feedburner:origLink></item>
		<item>
		<title>WordCamp San Francisco May 1st, 2010</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/8HnURNNhDvk/</link>
		<comments>http://tipsforwordpress.com/wordpress/wordcamp-san-francisco-may-1st-2010/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 18:24:54 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[sf]]></category>
		<category><![CDATA[wordcamp]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=82</guid>
		<description><![CDATA[Just bought two WordCamp San Francisco tickets. I have never been to anything like this before and don&#8217;t know what to expect. There aren&#8217;t any speakers yet, but it will be interesting to meet some WordPress folk. There are already &#8230; <a href="http://tipsforwordpress.com/wordpress/wordcamp-san-francisco-may-1st-2010/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just bought two <a href="http://2010.sf.wordcamp.org/">WordCamp San Francisco</a> tickets. I have never been to anything like this before and don&#8217;t know what to expect. There aren&#8217;t any speakers yet, but it will be interesting to meet some WordPress folk. There are already some <a href="http://2010.sf.wordcamp.org/attendees/">194 attendees</a> which is impressive. I don&#8217;t really know anyone on the list except for <a href="http://ma.tt/">ma.tt</a>, But I would be interested in talking with some theme developers. I really like <a href="http://www.studiopress.com/">studiopress</a> and would be interested in chatting them up.</p>
<p>Anyways May 1st is a long way away.</p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/8HnURNNhDvk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/wordcamp-san-francisco-may-1st-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/wordcamp-san-francisco-may-1st-2010/</feedburner:origLink></item>
		<item>
		<title>Using Custom Fields in Comments</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/Kbi3Wg55Pmc/</link>
		<comments>http://tipsforwordpress.com/wordpress/using-custom-fields-in-comments/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 22:00:54 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=77</guid>
		<description><![CDATA[For a private wordpress site I have been using a custom comments table. It just has an added row where people rate the business. Everything is included in the comments table where I don&#8217;t need to make a custom table &#8230; <a href="http://tipsforwordpress.com/wordpress/using-custom-fields-in-comments/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For a private wordpress site I have been using a custom comments table. It just has an added row where people rate the business. Everything is included in the comments table where I don&#8217;t need to make a custom table for the ip address, the name, blah blah blah. So now with wordpress 2.9 they have added custom fields for comments so this eliminates the use of me having to do this, YAAAA!</p>
<p>Using custom fields for comments is just like using custom fields for wordpress.</p>
<p>So instead of using: <code>update_post_meta('postid', 'customfield', 'customfieldvalue'); </code></p>
<p>We now use: <code>update_comment_meta('postid', 'customfield', 'customfieldvalue'); </code></p>
<p>So in your plugin or functions.php file you can just do this:<br />
<code><br />
add_action('comment_post','comment_rating');<br />
function comment_rating($comment_id) {<br />
global $wpdb, $user_identity, $user_ID;<br />
$star = $_POST['rating'];<br />
update_comment_meta('postid', 'rating', $star);<br />
}</code></p>
<p>Again you need to add a rating drop down in your comments.php file (example): &lt;input type=&#8221;radio&#8221; name=&#8221;rating&#8221; id=&#8221;vote1&#8243; value=&#8221;1&#8243; /&gt;</p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/Kbi3Wg55Pmc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/using-custom-fields-in-comments/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/using-custom-fields-in-comments/</feedburner:origLink></item>
		<item>
		<title>Removing first image from the_content</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/UczdcuB1fPc/</link>
		<comments>http://tipsforwordpress.com/wordpress/removing-first-image-from-the_content/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 20:09:01 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[removing]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=70</guid>
		<description><![CDATA[I recently had a client want to put the_title below the first image. Without making it to complicated by adding custom fields or anything like that. I thought that I could grab the first image from the content with catch_that_image &#8230; <a href="http://tipsforwordpress.com/wordpress/removing-first-image-from-the_content/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had a client want to put the_title below the first image. Without making it to complicated by adding custom fields or anything like that. I thought that I could grab the first image from the content with catch_that_image and then display the title and then display the_content. But if I did it that way, it would display the first image twice. So I had to come up with a way to remove the first image from the_content here comes filters!</p>
<pre>
// This is the filter that gets added to the content
add_filter( 'the_content', 'remove_first_image' );

// This is the function name
function remove_first_image($content) {
global $post, $posts;

// This is the pre replace that removes the first image
$content = preg_replace('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i',$matches,$post->post_content,1);
return $content;
}
</pre>
<p>You can see a working example at <a href="http://mynameiscasey.com/sno/barack-obama/">Barack Obama</a>. The first image is called via catch_that_image and then the_title is displayed and then the_content after that. </p>
<p>This way Casey just keeps doing what he is doing without having to change any of the posts around that he already has done. </p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/UczdcuB1fPc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/removing-first-image-from-the_content/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/removing-first-image-from-the_content/</feedburner:origLink></item>
		<item>
		<title>Add Custom Field to Register Form</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/n3s4PWTJBFU/</link>
		<comments>http://tipsforwordpress.com/wordpress/add-custom-field-to-register-form/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 23:23:38 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=65</guid>
		<description><![CDATA[this is gonna be a quick one, cause I need to finish website. But I got this working today. This is for function.php file or in a plugin will work. This will add two forms to the register page in &#8230; <a href="http://tipsforwordpress.com/wordpress/add-custom-field-to-register-form/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>this is gonna be a quick one, cause I need to finish website. But I got this working today. This is for function.php file or in a plugin will work. This will add two forms to the register page in your wordpress, First Name and Last Name.</p>
<p>add_action(&#8216;register_form&#8217;,'show_first_name_field&#8217;);<br />
add_action(&#8216;register_post&#8217;,'check_fields&#8217;,10,3);<br />
add_action(&#8216;user_register&#8217;, &#8216;register_extra_fields&#8217;);</p>
<p>function show_first_name_field(){<br />
?&gt;<br />
&lt;p&gt;<br />
&lt;label&gt;First Name&lt;br/&gt;<br />
&lt;input id=&#8221;user_email&#8221; type=&#8221;text&#8221; tabindex=&#8221;20&#8243; size=&#8221;25&#8243; value=&#8221;&lt;?php echo $_POST['first']; ?&gt;&#8221; name=&#8221;first&#8221;/&gt;<br />
&lt;/label&gt;<br />
&lt;/p&gt;<br />
&lt;p&gt;<br />
&lt;label&gt;Last Name&lt;br/&gt;<br />
&lt;input id=&#8221;user_email&#8221; type=&#8221;text&#8221; tabindex=&#8221;20&#8243; size=&#8221;25&#8243; value=&#8221;&lt;?php echo $_POST['last']; ?&gt;&#8221; name=&#8221;last&#8221;/&gt;<br />
&lt;/label&gt;<br />
&lt;/p&gt;<br />
&lt;?php<br />
}</p>
<p>function check_fields($login, $email, $errors) {<br />
global $firstname, $lastname;<br />
if ($_POST['first'] == &#8221;) {<br />
$errors-&gt;add(&#8216;empty_realname&#8217;, &#8220;&lt;strong&gt;ERROR&lt;/strong&gt;: Please Enter in First Name&#8221;);<br />
} else {<br />
$firstname = $_POST['first'];<br />
}<br />
if ($_POST['last'] == &#8221;) {<br />
$errors-&gt;add(&#8216;empty_realname&#8217;, &#8220;&lt;strong&gt;ERROR&lt;/strong&gt;: Please Enter in Last Name&#8221;);<br />
} else {<br />
$firstname = $_POST['last'];<br />
}<br />
}<br />
function register_extra_fields($user_id, $password=&#8221;", $meta=array())  {</p>
<p>$userdata = array();<br />
$userdata['ID'] = $user_id;<br />
$userdata['first_name'] = $_POST['first'];<br />
$userdata['last_name'] = $_POST['last'];<br />
wp_update_user($userdata);<br />
}</p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/n3s4PWTJBFU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/add-custom-field-to-register-form/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/add-custom-field-to-register-form/</feedburner:origLink></item>
		<item>
		<title>Why Include a Logout Button?</title>
		<link>http://feedproxy.google.com/~r/tipsforwordpress/~3/Jb4KndXt7dU/</link>
		<comments>http://tipsforwordpress.com/wordpress/why-include-a-logout-button/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 00:06:16 +0000</pubDate>
		<dc:creator>Weston Deboer</dc:creator>
				<category><![CDATA[Clients]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://tipsforwordpress.com/?p=63</guid>
		<description><![CDATA[So I am making a site where users can create an account on this site. It is not an important site where multiple users are going to be using the site, where there is a need for a logout button. &#8230; <a href="http://tipsforwordpress.com/wordpress/why-include-a-logout-button/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I am making a site where users can create an account on this site. It is not an important site where multiple users are going to be using the site, where there is a need for a logout button. So I am not going to include a logout button anywhere on the site. I just don&#8217;t see a use for it at all, unless someone will tell me different. </p>
<img src="http://feeds.feedburner.com/~r/tipsforwordpress/~4/Jb4KndXt7dU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tipsforwordpress.com/wordpress/why-include-a-logout-button/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://tipsforwordpress.com/wordpress/why-include-a-logout-button/</feedburner:origLink></item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
