<?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>AppThemes Docs &#187; Tutorials</title>
	<atom:link href="http://docs.appthemes.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://docs.appthemes.com</link>
	<description>Just another AppThemes site</description>
	<lastBuildDate>Wed, 16 May 2012 04:04:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Secure your WordPress wp-config.php File</title>
		<link>http://docs.appthemes.com/tutorials/secure-your-wordpress-wp-config-php-file/</link>
		<comments>http://docs.appthemes.com/tutorials/secure-your-wordpress-wp-config-php-file/#comments</comments>
		<pubDate>Fri, 11 May 2012 06:02:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=2202</guid>
		<description><![CDATA[The wp-config.php file is the most important file to protect on your site. It contains your username, password, and database name (among other things) for your WordPress install and by default, is accessible from any web browser. Try it. Enter http://www.yourwebsite.com/wp-config.php and you should see a blank white page (if you see plain text, you&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>The wp-config.php file is the most important file to protect on your site. It contains your username, password, and database name (among other things) for your WordPress install and by default, is accessible from any web browser.</p>
<p>Try it. Enter <em>http://www.yourwebsite.com/wp-config.php</em> and you should see a blank white page (if you see plain text, you&#8217;ve got a <a href="http://stackoverflow.com/questions/3555681/why-are-my-php-files-showing-as-plain-text" target="_blank">bigger problem</a>). </p>
<p>Harmless, right? Sure, but imagine for a minute the shared server you&#8217;re on somehow gets hacked and the php handler gets changed to txt&#8211;you&#8217;re in trouble. It&#8217;s not very likely but you can make one of the following changes to prevent this which adds another layer of protection and gives you peace of mind.</p>
<p>There are two main ways to easily protect the wp-config.php file from prying eyes and hackers. Both methods require you to have sftp or server-level access. Also turn off any caching plugins you may be using before attempting this steps.</p>
<div id="attachment_2203" class="wp-caption alignright" style="width: 160px"><a href="http://docs.appthemes.com/files/2012/05/wp-config-secure.jpg?4c9b33"><img src="http://docs.appthemes.com/files/2012/05/wp-config-secure-150x150.jpg?4c9b33" alt="" title="wp-config.php secure file" width="150" height="150" class="size-thumbnail wp-image-2203" /></a><p class="wp-caption-text">Move your wp-config.php file up one level (image source: theclickstarter.com)</p></div>
<h3>Option 1 &#8211; Move wp-config.php up one directory</h3>
<p>This is the easiest way assuming you&#8217;re comfortable moving files on your server. Essentially this works by taking wp-config.php and moving it outside of the public realm (typically one level above /public_html). </p>
<p>The cool part is WordPress automatically knows to look up one directory if it can&#8217;t find wp-config.php in the default location. </p>
<h3>Option 2 &#8211; Modify your .htaccess or .conf file</h3>
<p>This option is a little more advanced and requires that you&#8217;re running Apache or Nginx. You&#8217;ll need to edit your .htaccess file (Apache) or nginx.conf (Nginx) using a text editor. Be careful not to alter any other code in this file otherwise your site may break.</p>
<p>For Apache, paste the following code into .htaccess at the top:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Deny public access to wp-config.php
</span><span style="color: #339933;">&lt;</span>Files wp<span style="color: #339933;">-</span>config<span style="color: #339933;">.</span>php<span style="color: #339933;">&gt;</span>
    Order allow<span style="color: #339933;">,</span>deny
    Deny from all
<span style="color: #339933;">&lt;/</span>Files<span style="color: #339933;">&gt;</span></pre></div></div>

<p>For Nginx, paste in the following code into nginx.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Deny public access to wp-config.php
</span>location ~<span style="color: #339933;">*</span> wp<span style="color: #339933;">-</span>config<span style="color: #339933;">.</span>php <span style="color: #009900;">&#123;</span> 
    deny all<span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Save and sftp it back to the server (if needed). You&#8217;ll need to restart Nginx but not Apache.</p>
<p>To test if it works, try visiting <em>http://www.yourwebsite.com/wp-config.php</em> in your web browser again. Instead of a blank white screen, you should see an &#8220;Access Forbidden 403&#8243; error message.  </p>
<h3>What does AppThemes use?</h3>
<p>We run multiple WordPress sites (multi site and single instances) so our needs are a bit more advanced. We also keep our sites in a git code repository that run auto-deployments which makes it a little more difficult to accomplish option #1.</p>
<p>Instead, we opted for option #2, albeit a tad more advanced implementation. We&#8217;ve got a dedicated server with complete root access so instead of having to manually add the deny block to each .htaccess file, we setup a global directive in httpd.conf. Just paste in the option #2 code, save, and restart Apache in order for it to take effect.</p>
<p>For even more advanced security WordPress tips, check out the &#8220;<a href="http://codex.wordpress.org/Hardening_WordPress" target="_blank">Hardening WordPress</a>&#8221; page on the WordPress site.</p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/secure-your-wordpress-wp-config-php-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up &#8216;Submit Coupon&#8217; Links</title>
		<link>http://docs.appthemes.com/clipper/setting-up-submit-coupon-links/</link>
		<comments>http://docs.appthemes.com/clipper/setting-up-submit-coupon-links/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 07:23:59 +0000</pubDate>
		<dc:creator>Shannon</dc:creator>
				<category><![CDATA[Clipper]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1994</guid>
		<description><![CDATA[Clipper 1.3 provides two convenient locations for adding pre-styled &#8220;Submit a Coupon&#8221; links. Sidebar Previous to Clipper 1.3, a &#8220;Share a Coupon&#8221; button was hard coded at the top of each sidebar. Starting in version 1.3, this button is now available as a sidebar widget. Now you can decide which sidebars include this coupon sharing [...]]]></description>
			<content:encoded><![CDATA[<p>Clipper 1.3 provides two convenient locations for adding pre-styled &#8220;Submit a Coupon&#8221; links.</p>
<h3>Sidebar</h3>
<p>Previous to Clipper 1.3, a &#8220;Share a Coupon&#8221; button was hard coded at the top of each sidebar. Starting in version 1.3, this button is now available as a sidebar widget. Now you can decide which sidebars include this coupon sharing button. Just like any other sidebar widget, you can also control where the button appears in the sidebar.</p>
<div id="attachment_1998" class="wp-caption alignright" style="width: 160px"><a href="http://docs.appthemes.com/files/2012/04/submit-coupon-widget.png?4c9b33"><img class="size-thumbnail wp-image-1998 " title="submit-coupon-widget" src="http://docs.appthemes.com/files/2012/04/submit-coupon-widget-150x150.png?4c9b33" alt="" width="150" height="150" /></a><p class="wp-caption-text">Sidebar Button</p></div>
<p>To add the &#8220;Share a Coupon&#8221; button to the sidebar&#8230;</p>
<ul>
<li>Go to <strong>Admin</strong> &gt; <strong>Appearance</strong> &gt; <strong>Widgets</strong></li>
<li>Find the <strong>&#8220;Clipper Share Coupon Button&#8221;</strong> widget</li>
<li>Drag and drop the widget to the desired sidebar</li>
<li>Add a <strong>Title</strong> &#8211; this will appear as the large text on the button</li>
<li>Add a <strong>Description</strong> &#8211; this will appear as the smaller text on the button</li>
<li>Click the <strong>Save</strong> button</li>
</ul>
<p>By default, the button does not appear in the sidebar. The widget must be added to a sidebar in order for it to appear in your installation of Clipper.</p>
<p>That&#8217;s it. Not sure how widgets work? See the <a href="http://codex.wordpress.org/WordPress_Widgets">WordPress Codex article on widgets</a>.</p>
<h3>Primary Navigation</h3>
<p>We have also added a &#8220;Submit a Coupon&#8221; link to the primary navigation of Clipper. By default, this link is included in the primary navigation but you can easily remove it, change the location and change the text on the link. Even though Clipper 1.3 comes with this link already in the primary navigation, we&#8217;ll start the tutorial with instructions on how to add it to the primary navigation, just in case. Here&#8217;s how you do it&#8230;</p>
<div id="attachment_1999" class="wp-caption alignright" style="width: 160px"><a href="http://docs.appthemes.com/files/2012/04/submit-coupon-nav1.png?4c9b33"><img class="size-thumbnail wp-image-1999  " title="submit-coupon-nav" src="http://docs.appthemes.com/files/2012/04/submit-coupon-nav1-150x150.png?4c9b33" alt="" width="150" height="150" /></a><p class="wp-caption-text">Primary Nav Link</p></div>
<ul>
<li>Go to <strong>Admin</strong> &gt; <strong>Appearance</strong> &gt; <strong>Menus</strong></li>
<li>Make sure the <strong>Clipper Main Menu</strong> tab is chosen</li>
<li>In the <strong>Pages</strong> panel, check the box next to <strong>Share Coupon</strong></li>
<li>In the <strong>Pages</strong> panel, click <strong>Save</strong></li>
<li>You will now see that <strong>Share Coupon</strong> has been added to the bottom of <strong>Clipper Main Menu</strong></li>
<li>Change the position of this item by clicking and dragging it up and down the order of menu items</li>
<li>Add desired text (IE: Submit a Coupon) to the Navigation Label in the <strong>Share Coupon</strong> menu item</li>
<li>Click the <strong>Save Menu</strong> button</li>
<li>On the same page in the <strong>Theme Locations</strong> panel, click the option menu under <strong>Primary Navigation</strong></li>
<li>Choose <strong>Clipper Main Menu</strong></li>
<li>Click the <strong>Save</strong> button</li>
</ul>
<p>There you have it. Need help on WordPress menus? Read this article on <a href="http://codex.wordpress.org/Appearance_Menus_Screen">WordPress menus</a> on the codex.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/clipper/setting-up-submit-coupon-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable PayPal PDT (Payment Data Transfer)</title>
		<link>http://docs.appthemes.com/tutorials/enable-paypal-pdt-payment-data-transfer/</link>
		<comments>http://docs.appthemes.com/tutorials/enable-paypal-pdt-payment-data-transfer/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 20:57:13 +0000</pubDate>
		<dc:creator>Shannon</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[payment gateways]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[PDT]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1921</guid>
		<description><![CDATA[Using PDT, we are able to offer an even higher level of security for PayPal transactions. PDT is completely optional in Vantage. We recommend the use of PDT, but you can rest assured that if you choose not to use PDT, your PayPal transactions will still be very secure. Below are the instructions on how [...]]]></description>
			<content:encoded><![CDATA[<p>Using PDT, we are able to offer an even higher level of security for PayPal transactions. PDT is completely optional in Vantage. We recommend the use of PDT, but you can rest assured that if you choose not to use PDT, your PayPal transactions will still be very secure.</p>
<p>Below are the instructions on how to enable PDT for your Vantage install:</p>
<p>Note: In order to use PDT, you will need a PayPal business account. Upgrading is easy and free. Just log into your PayPal account and click <em><strong>Upgrade</strong></em>.</p>
<ol>
<li>Log into your PayPal account</li>
<li>Click <em><strong>My Account</strong></em> &gt;<em><strong> Profile</strong></em></li>
<li>Click <em><strong>Selling Tools</strong></em></li>
<li>Under <em><strong>Selling Online</strong></em>, look for <em><strong>Website Preferences</strong></em> and click <em><strong>Update</strong></em> on the far right</li>
<li>Website Payment Preferences page
<ol>
<li style="list-style-type:lower-alpha;">Under <em><strong>Auto Return</strong></em> for <em><strong>Website Payments</strong></em>, click <em><strong>On</strong></em></li>
<li style="list-style-type:lower-alpha;">Enter a URL in the <em><strong>Return URL</strong></em> field (see extra notes below)</li>
<li style="list-style-type:lower-alpha;">Scroll down to <em><strong>Payment Data Transfer</strong></em> and click <em><strong>On</strong></em></li>
<li style="list-style-type:lower-alpha;">Scroll to the bottom of the page and click the <em><strong>Save</strong></em> button</li>
</ol>
</li>
<li>PayPal will return a message in a green box that reads: &ldquo;You have successfully saved your preferences. Please use the following identity token when setting up Payment Data Transfer on your website.&rdquo;
<ol>
<li style="list-style-type:lower-alpha;">After the message will be a very long string of numbers and letters</li>
<li style="list-style-type:lower-alpha;">This is your ID token</li>
<li style="list-style-type:lower-alpha;">Copy the ID token</li>
</ol>
</li>
<li>In the left column menu in the Vantage admin, go to <em><strong>Vantage</strong></em> &gt; <em><strong>Settings</strong></em></li>
<li>Click the <em><strong>Save Changes</strong></em> button</li>
<li>Click the <em><strong>Payments</strong></em> tab
<ol>
<li style="list-style-type:lower-alpha;">Scroll down to <em><strong>Enable Gateways</strong></em></li>
<li style="list-style-type:lower-alpha;">Next to <em><strong>PayPal</strong></em>,  check the box marked <em><strong>Enable</strong></em></li>
</ol>
</li>
<li>Click the <em><strong>PayPal</strong></em> tab
<ol>
<li style="list-style-type:lower-alpha;">Under <em><strong>Payment Data Transfer</strong></em> (PDT)</li>
<li style="list-style-type:lower-alpha;">Check the box to the right of <strong><em>Enable PDT</em></strong></li>
<li style="list-style-type:lower-alpha;">Paste your token into the field to the right of <em><strong>Identity Token</strong></em></li>
</ol>
</li>
<li>Click the <em><strong>Save Changes</strong></em> button</li>
<li>PayPal PDT is now enabled</li>
</ol>
<p> Notes for <em><strong>Return URL</strong></em>:</p>
<ul>
<li>If you have no other sites that use PDT, you can enter any URL into <em><strong>Return URL</strong></em>. Vantage controls the return URL and overrides any URL entered into <em><strong>Return URL</strong></em>. Regardless, we recommend entering your site’s root URL (IE: www.yoursite.com)</li>
<li>If you have another site that uses PDT, you should enter the return URL that you prefer for that site. Again, Vantage controls the return URL for your Vantage site and does not use the return URL provided on your PayPal account.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/enable-paypal-pdt-payment-data-transfer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Reset MySQL Root Password</title>
		<link>http://docs.appthemes.com/tutorials/how-to-reset-mysql-root-password/</link>
		<comments>http://docs.appthemes.com/tutorials/how-to-reset-mysql-root-password/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 04:22:22 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql password]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1695</guid>
		<description><![CDATA[If you&#8217;ve ever forgotten or misplaced your mySQL root password, there&#8217;s a handy trick to resetting it. This tutorial assumes you have SSH command line access to your server with super user (sudo) permissions and able to edit using vim (or nano). Step 1 After you&#8217;ve logged in, let&#8217;s create the simple sql script that [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever forgotten or misplaced your mySQL root password, there&#8217;s a handy trick to resetting it.</p>
<p>This tutorial assumes you have SSH command line access to your server with super user (sudo) permissions and able to edit using vim (or nano). </p>
<h2>Step 1</h2>
<p>After you&#8217;ve logged in, let&#8217;s create the simple sql script that will reset your root password.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">vim ~<span style="color: #339933;">/</span><span style="color: #990000;">reset</span><span style="color: #339933;">.</span>sql</pre></div></div>

<p>Once in vim edit mode, you&#8217;ll need to insert the statement below. Replace <em>NEW-PASSWORD-HERE</em> with your new root password. You can generate a strong password on <a href="http://strongpasswordgenerator.com/" target="_blank">this site</a> or use an existing strong password.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">UPDATE <span style="color: #990000;">mysql</span><span style="color: #339933;">.</span>user SET Password<span style="color: #339933;">=</span>PASSWORD<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'NEW-PASSWORD-HERE'</span><span style="color: #009900;">&#41;</span> WHERE User<span style="color: #339933;">=</span><span style="color: #0000ff;">'root'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">FLUSH</span> PRIVILEGES<span style="color: #339933;">;</span></pre></div></div>

<p>Save and exit out of vim</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">:</span>wq</pre></div></div>

<h2>Step 2</h2>
<p>Next you&#8217;ll need to stop the mySQL server. If it&#8217;s a production site, you should do this during off hours since it will take down your entire database.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># RHEL, Fedora, or CentOS Linux
</span><span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span>init<span style="color: #339933;">.</span>d<span style="color: #339933;">/</span>mysqld stop
&nbsp;
<span style="color: #666666; font-style: italic;"># optional method 
</span>service mysqld stop
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># Debian or Ubuntu Linux
</span><span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span>init<span style="color: #339933;">.</span>d<span style="color: #339933;">/</span><span style="color: #990000;">mysql</span> stop
&nbsp;
<span style="color: #666666; font-style: italic;"># optional method 
</span>service <span style="color: #990000;">mysql</span> stop</pre></div></div>

<h2>Step 3</h2>
<p>Now we&#8217;re going to restart mysql in safe mode and execute the script you created in step 1. Note the path (~/reset.sql) and the ampersand (&#038;) at the end.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">mysqld_safe <span style="color: #339933;">--</span>init<span style="color: #339933;">-</span><span style="color: #990000;">file</span><span style="color: #339933;">=</span>~<span style="color: #339933;">/</span><span style="color: #990000;">reset</span><span style="color: #339933;">.</span>sql <span style="color: #339933;">&amp;</span></pre></div></div>

<p>You should see something like this returned</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">111226</span> <span style="color: #cc66cc;">22</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">31</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">42</span> mysqld_safe Logging to <span style="color: #990000;">syslog</span><span style="color: #339933;">.</span>
<span style="color: #cc66cc;">111226</span> <span style="color: #cc66cc;">22</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">31</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">42</span> mysqld_safe Starting mysqld daemon with databases from <span style="color: #339933;">/</span><span style="color: #000000; font-weight: bold;">var</span><span style="color: #339933;">/</span>lib<span style="color: #339933;">/</span><span style="color: #990000;">mysql</span></pre></div></div>

<h2>Step 4</h2>
<p>The root password should have been reset so let&#8217;s restart the mySQL server in normal mode.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># RHEL, Fedora, or CentOS Linux
</span><span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span>init<span style="color: #339933;">.</span>d<span style="color: #339933;">/</span>mysqld restart
&nbsp;
<span style="color: #666666; font-style: italic;"># optional method 
</span>service mysqld restart
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># Debian or Ubuntu Linux
</span><span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span>init<span style="color: #339933;">.</span>d<span style="color: #339933;">/</span><span style="color: #990000;">mysql</span> restart
&nbsp;
<span style="color: #666666; font-style: italic;"># optional method 
</span>service <span style="color: #990000;">mysql</span> restart</pre></div></div>

<p>Now try logging into mysql with your new root password.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">mysql</span> <span style="color: #339933;">-</span>u root <span style="color: #339933;">-</span>p</pre></div></div>

<p>If it works, then you&#8217;ve done it correctly! Now make sure to write down your password somewhere or save it online in a safe location. </p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/how-to-reset-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save the Users Last Login Date and Time</title>
		<link>http://docs.appthemes.com/tutorials/save-the-users-last-login-date-and-time/</link>
		<comments>http://docs.appthemes.com/tutorials/save-the-users-last-login-date-and-time/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 01:58:27 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[last login]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1666</guid>
		<description><![CDATA[If you&#8217;ve ever wanted to capture and display your WordPress users last login date and time, this tutorial is for you. It&#8217;s a great way to see how active your current user base is, if certain customers ever logged in, and for security audit purposes. This tutorial assumes you know how to edit your theme&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever wanted to capture and display your WordPress users last login date and time, this tutorial is for you. It&#8217;s a great way to see how active your current user base is, if certain customers ever logged in, and for security audit purposes.</p>
<p>This tutorial assumes you know how to edit your theme&#8217;s functions.php file.</p>
<h2>Step 1</h2>
<p>First, we&#8217;ll want to insert the date and time whenever a user logs into your site. This function uses the wp_login hook and will store the data in a user meta field.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// insert the last login date for each user</span>
<span style="color: #000000; font-weight: bold;">function</span> insert_last_login<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$login</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$user_id</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> get_userdatabylogin<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$login</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    update_user_meta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'last_login'</span><span style="color: #339933;">,</span> <span style="color: #990000;">gmdate</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Y-m-d H:i:s'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_login'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'insert_last_login'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Step 2</h2>
<p>Next, we need to add a new user column called, &#8220;Last Login&#8221;. This will be visible on your &#8220;Users&#8221; => &#8220;All Users&#8221; WordPress admin screen. Below the code you inserted above, paste in the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// add a new &quot;Last Login&quot; user column</span>
<span style="color: #000000; font-weight: bold;">function</span> add_last_login_column<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$columns</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$columns</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'last_login'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Last Login'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'last_login'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$columns</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'manage_users_columns'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_last_login_column'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Step 3</h2>
<p>The last bit of code we need to add will populate the actual user login data in the column we created above. Below the previous code you pasted in your functions.php file, add this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// add the &quot;Last Login&quot; user data to the new column</span>
<span style="color: #000000; font-weight: bold;">function</span> add_last_login_column_value<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$value</span><span style="color: #339933;">,</span> <span style="color: #000088;">$column_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_id</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> get_userdata<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_id</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'last_login'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$column_name</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">last_login</span> <span style="color: #009900;">&#41;</span>
        <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'m/d/Y g:ia'</span><span style="color: #339933;">,</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">last_login</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'manage_users_custom_column'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_last_login_column_value'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now visit your WordPress admin users page and you should see the new column. If you already logged in, it should show your last login date/time. </p>
<div id="attachment_1673" class="wp-caption aligncenter" style="width: 310px"><a href="http://docs.appthemes.com/files/2011/12/last-login-wordpress.png?4c9b33"><img src="http://docs.appthemes.com/files/2011/12/last-login-wordpress-300x127.png?4c9b33" alt="" title="last-login-wordpress" width="300" height="127" class="size-medium wp-image-1673" /></a><p class="wp-caption-text">Adding a last login column to the users admin page.</p></div>
<p>Congrats, you&#8217;ve completed this tutorial!</p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/save-the-users-last-login-date-and-time/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Theme Language Files</title>
		<link>http://docs.appthemes.com/tutorials/using-theme-language-files/</link>
		<comments>http://docs.appthemes.com/tutorials/using-theme-language-files/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 01:58:03 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1640</guid>
		<description><![CDATA[If you&#8217;d like to use our themes in another language, it&#8217;s pretty easy to do. This tutorial assumes you already have a .mo file in your language and you&#8217;re ready to upload it to your AppThemes site. In this example, we want to change JobRoller to Brazilian Portuguese. Here are the steps you need to [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;d like to use our themes in another language, it&#8217;s pretty easy to do. This tutorial assumes you already have a .mo file in your language and you&#8217;re ready to upload it to your AppThemes site.</p>
<p>In this example, we want to change JobRoller to Brazilian Portuguese. Here are the steps you need to take. </p>
<h2>Step 1</h2>
<p>Download the language file from our <a href="http://www.appthemes.com/support/languages/jobroller/" target="_blank">language pack page</a>. Unzip the package and inside you&#8217;ll find a pt_BR.mo file. Rename that file to &#8220;jobroller-pt_BR.mo&#8221; and then set it aside. We&#8217;ll come back to it later.</p>
<p>Note: If a language pack doesn&#8217;t exist for your language, you&#8217;ll have to create it yourself. Our <a href="http://www.appthemes.com/blog/how-to-translate-a-wordpress-theme/" target="_blank">How to Translate a WordPress Theme</a> tutorial will explain how to do it. </p>
<h2>Step 2</h2>
<p>If you haven&#8217;t already done so, you&#8217;ll need to tell WordPress that it should use Brazilian Portuguese. You declare this in the <a href="http://codex.wordpress.org/Editing_wp-config.php" target="_blank">wp-config.php</a> file usually located in the root on your server. You&#8217;ll need to use SFTP or SSH in order to edit this file.</p>
<p>Once you are in edit mode, add the following line anywhere. Make sure this doesn&#8217;t already exist, however.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'WPLANG'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'pt_BR'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now upload that file back to your server and overwrite the old one. </p>
<h2>Step 3</h2>
<p>Next you need to upload the .mo file to your server. This file contains the actual text translations for the theme. Before doing so, you&#8217;ll need to create a couple of new folders. SFTP/SSH back to your site and go into the wp-content folder. </p>
<ol>
<li>Create a new folder called &#8220;languages&#8221;</li>
<li>Go inside that folder and create another folder called &#8220;themes&#8221;</li>
<li>Copy the &#8220;jobroller-pt_BR.mo&#8221; file you set aside earlier into this folder</li>
</ol>
<p>The final new folder structure with the .mo file should look like this.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">/</span>wp<span style="color: #339933;">-</span>content<span style="color: #339933;">/</span>languages<span style="color: #339933;">/</span>themes<span style="color: #339933;">/</span>jobroller<span style="color: #339933;">-</span>pt_BR<span style="color: #339933;">.</span>mo</pre></div></div>

<p>The name of the .mo file is very important. It&#8217;s also case sensitive. If it doesn&#8217;t match the theme name, language code, and country code it won&#8217;t work. Same goes for the define constant in step 2 above. Links to all codes can be found in <a href="http://www.appthemes.com/blog/how-to-translate-a-wordpress-theme/" target="_blank">this post</a>.</p>
<p>File naming format should be as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>THEME NAME<span style="color: #009900;">&#93;</span><span style="color: #339933;">-</span><span style="color: #009900;">&#91;</span>LANGUAGE CODE<span style="color: #009900;">&#93;</span>_<span style="color: #009900;">&#91;</span>COUNTRY CODE<span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>mo</pre></div></div>

<p>Now visit your website and refresh any page (clear your cache too if using a caching plugin). You should now see it in Brazilian Portuguese!</p>
<h2>FAQ</h2>
<p><strong>Why do I have to create new folders for the language file instead of just placing it in the /wp-content/themes/jobroller/ folder?</strong><br />
Because the language file would get deleted if you upgraded to the next version. This wasn&#8217;t the case until we moved to <a href="http://www.appthemes.com/blog/two-click-theme-updates/">two click theme updates</a> back in October, when we had to make this change.</p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/using-theme-language-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to 301 Redirect Non-www to www URLs</title>
		<link>http://docs.appthemes.com/tutorials/how-to-301-redirect-non-www-to-www-urls/</link>
		<comments>http://docs.appthemes.com/tutorials/how-to-301-redirect-non-www-to-www-urls/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 20:50:26 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[301 redirect]]></category>
		<category><![CDATA[rewrite rules]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1441</guid>
		<description><![CDATA[In the eyes of search engines, http://appthemes.com and http://www.appthemes.com are considered different websites. So if other websites link to yours using non-www and www urls, you are effectively diluting your Google page rank and losing the benefit of valuable inbound link juice. Step 1 How can I tell if other websites are linking to mine [...]]]></description>
			<content:encoded><![CDATA[<p>In the eyes of search engines, http://appthemes.com and http://www.appthemes.com are considered different websites. So if other websites link to yours using non-www and www urls, you are effectively diluting your Google page rank and losing the benefit of valuable inbound link juice.</p>
<h2>Step 1</h2>
<p>How can I tell if other websites are linking to mine without the www? Google has a nifty little feature that will show you which sites and how many are doing this. Enter the following in Google search (replace appthemes.com with your site):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">link</span><span style="color: #339933;">:</span>appthemes<span style="color: #339933;">.</span>com</pre></div></div>

<p>The <a href="http://www.google.com/#&amp;hl=en&amp;q=link:appthemes.com" target="_blank">results</a> will show you roughly how many inbound links and juice you&#8217;re losing because they aren&#8217;t linking to your www site!</p>
<p>So how can you prevent this from happening? The best way is to channel all non-www links into your www links. This is done with two lines of code that need to be added to your .htaccess file (does not work for IIS Windows web hosted sites).</p>
<h2>Step 2</h2>
<p>First you&#8217;ll want to sftp or ssh into your website. Then go to your WordPress root and find the .htaccess file. Edit the file and be careful not to modify any of the existing contents.</p>
<p>At the top, you&#8217;ll want to add the following two lines (change appthemes to your domain name):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP_HOST<span style="color: #009900;">&#125;</span> ^appthemes\<span style="color: #339933;">.</span>com$ <span style="color: #009900;">&#91;</span>NC<span style="color: #009900;">&#93;</span>
RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>$ http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.appthemes.com/$1 [R=301,L]</span></pre></div></div>

<p>Save and upload .htaccess back to your server. Now try loading up your website without the www and it should automatically change to www.yoursite.com.</p>
<p>Within a few weeks, you should notice slightly higher rankings in Google (assuming you had non-www links to your site). It will also handle any new links as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/how-to-301-redirect-non-www-to-www-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improve WordPress Performance</title>
		<link>http://docs.appthemes.com/tutorials/improve-wordpress-performance/</link>
		<comments>http://docs.appthemes.com/tutorials/improve-wordpress-performance/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 22:06:52 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress performance]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1433</guid>
		<description><![CDATA[Does your WordPress site take a long time to load? Wondering what could be the problem? Well, honestly, it could be a number of things and here are a few ways to troubleshoot and improve your page load performance. Find the Culprit The first step to improving performance, is to identify what&#8217;s causing the slow-down [...]]]></description>
			<content:encoded><![CDATA[<p>Does your WordPress site take a long time to load? Wondering what could be the problem? Well, honestly, it could be a number of things and here are a few ways to troubleshoot and improve your page load performance.</p>
<h2>Find the Culprit</h2>
<p>The first step to improving performance, is to identify what&#8217;s causing the slow-down in the first place. There are several great browser plugins which can examine your site such as Google&#8217;s <a href="http://pagespeed.googlelabs.com/" target="_blank">Page Speed</a> (online test), <a href="http://developer.yahoo.com/yslow/" target="_blank">YSlow</a>, and Chrome&#8217;s built-in developer tools (&#8220;View&#8221; => &#8220;Developer&#8221; => &#8220;Developer Tools&#8221;). After you run these tests, you&#8217;ll get a report and recommendation on what you should do to improve your site&#8217;s speed.</p>
<h2>Poor Web Hosting</h2>
<p>There are hundreds of web host providers out there today and it&#8217;s difficult to decide which one is best for you. Sure, you can (and should) spend time doing research online but many &#8220;web host review&#8221; sites are affiliate farms that recommend the web host company that pays them the highest commission. Hover over links before you click on them to see if they point directly to the web hosting site or &#8220;redirect&#8221; somewhere else first. </p>
<p>Is your host provider in the same state or even country as you? If not, that could be a problem. If you live in China and your web host provider is in Texas, of course performance will be slow. But what&#8217;s more important is where does your customer-base live? They are the ones who should have the best experience so you want your web server closest to them.</p>
<p>You get what you pay for. If you&#8217;re paying only $2.95/month for web hosting then you&#8217;re sharing the same server with dozens of other people. We pay over $200/month for a dedicated server which is expensive, but well worth it for the amount of traffic and load we deal with. In other words, find somewhere in between like $20 &#8211; $50/month for web hosting. A good question to ask is, &#8220;How many other customers will also be on the same server?&#8221;. VPS (virtual private server) is a good choice since you essentially get your own server (albeit virtually). </p>
<h2>Too Many Plugins</h2>
<p>How many plugins to you have running? There&#8217;s no limitation or recommendation but our rule of thumb is only have a handful installed at a time. Less is always better. Believe it or not, your site could be running slow due to just one plugin. Here&#8217;s how to find out if that&#8217;s the case. Disable your plugins one at a time and then try reloading your website after each one has been disabled. Notice a speed difference after disabling one? That&#8217;s the culprit. Surprisingly, many plugins are poorly written and can bog down your site. Always check the author, number of downloads, and rating of the plugin before using it. If it&#8217;s not highly rated, chances are it&#8217;s not very good. </p>
<h2>Poorly Written Theme</h2>
<p>There&#8217;s a right way and a wrong way to build themes for WordPress. Unfortunately, most people do it the wrong way. WordPress has a great API with a ton of high performance functions and if theme developers don&#8217;t know how to leverage the API, they end up coding something entirely new (and usually slower) solution.</p>
<p>Our themes have been highly optimized to work well with the WordPress API but we can&#8217;t speak for all the other themes out there. A quick way to tell if your theme has been written well is to install the <a href="http://wordpress.org/extend/plugins/theme-check/" target="_blank">WordPress Theme Check plugin</a> and see how the results end up. It won&#8217;t necessarily tell you if it&#8217;s been coded using the best standards, but rather audit the theme and make sure key components aren&#8217;t missing.</p>
<h2>Caching and Compression</h2>
<p>Make sure your web server has <a href="http://code.google.com/speed/articles/gzip.html" target="_blank">gzip compression</a> and <a href="http://code.google.com/speed/articles/caching.html" target="_blank">caching</a> turned on. This is a quick and easy way to see a <a href="http://code.google.com/speed/articles/use-compression.html" target="_blank">significant performance increase</a> on your site. Not all shared host providers allow this (they should) and you can run a quick Google <a href="http://pagespeed.googlelabs.com/" target="_blank">page speed test</a> to figure this out.</p>
<p>There&#8217;s also some really good caching WordPress plugins that handle a lot of this automatically. By far, the one we recommend most (and use ourselves) is called, <a href="http://wordpress.org/extend/plugins/w3-total-cache/" target="_blank">W3 Total Cache</a>. It&#8217;s free and provides a ton of options such as caching, compression, cdn integration with Amazon (and others), .js and .css minify, and more. It takes some time to get everything configured but once you do, you&#8217;ll love it.</p>
<p>Another more simple solution is <a href="http://wordpress.org/extend/plugins/wp-super-cache/" target="_blank">WP Super Cache</a>. It&#8217;s also a caching plugin but with less options. If you don&#8217;t feel like tinkering with dozens of options, this is the plugin for you. It will instantly speed up your site (cached pages vs database calls on each page load).</p>
<h2>MySQL, PHP, Apache</h2>
<p>For those of you who are really technical, you can further improve your website performance with tweaks to MySQL, PHP, and Apache. Those go beyond the scope of this article but there are <a href="http://elliottback.com/wp/why-my-wordpress-site-is-so-much-faster-than-yours/" target="_blank">other guides</a> out there which can assist you. Access to these sort of tweaks is usually only available to those with a VPS or dedicated web server since they are low-level adjustments. </p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/improve-wordpress-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a Google Plus One Button to Your Theme</title>
		<link>http://docs.appthemes.com/tutorials/add-a-google-plus-one-button-to-your-theme/</link>
		<comments>http://docs.appthemes.com/tutorials/add-a-google-plus-one-button-to-your-theme/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 03:01:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[google plus one]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1308</guid>
		<description><![CDATA[The following tutorial will explain how to automatically insert a Google +1 button at the bottom of every post and page. There are a few different parameters available so you can easily change things such as button size, language, count, and callback. See the Google +1 configuration page for more information. Step 1 Open and [...]]]></description>
			<content:encoded><![CDATA[<p>The following tutorial will explain how to automatically insert a Google +1 button at the bottom of every post and page. There are a few different parameters available so you can easily change things such as button size, language, count, and callback. See the <a href="http://code.google.com/apis/+1button/#configuration" target="_blank">Google +1 configuration page</a> for more information.</p>
<h2>Step 1</h2>
<p>Open and edit your theme functions.php file or child-theme functions.php file. If you don&#8217;t have functions.php, just create an empty file and save it. Then paste in the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * Use the asynchronous code to download 
 * in parallel and speed up page load time
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> insert_plusone_script<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;script type=&quot;text/javascript&quot;&gt;
  // &lt;![CDATA[
  window.___gcfg = {
        lang: 'en-US'
  };
&nbsp;
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
  // ]]&gt;
  &lt;/script&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
add_action <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'insert_plusone_script'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Insert the button on each page/post
 *
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> insert_plusone_button<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$content</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// if ( is_page() ) return; // uncomment to not show button on pages</span>
    <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;div class=&quot;plus-one&quot;&gt;&lt;g:plusone size=&quot;tall&quot; href=&quot;'</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;&lt;/g:plusone&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'insert_plusone_button'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><img src="http://docs.appthemes.com/files/2011/08/google-plus1-buttons.png?4c9b33" alt="" title="google-plus1-buttons" width="596" height="336" class="aligncenter size-full wp-image-1313" /></p>
<h2>Changing Parameters</h2>
<p>If you wanted to change the size of Google +1, you just need to change the <code>size="tall"</code> to one of the following: small, medium, or standard. To see what the different buttons would look like, check out <a href="http://code.google.com/apis/+1button/#button-sizes" target="_blank">this page</a>.</p>
<p>If you wanted to change your language to something other than English, you would just swap out the <code>lang: 'en-US'</code> with different language value. A list of available languages can be found <a href="http://code.google.com/apis/+1button/#languages" target="_blank">here</a>.</p>
<p>Lastly, we wrapped the button with a div tag so it could be styled. Just add some css to your style.css child-theme file to control the button position, etc. For example, <code>div.plus-one { float:left; padding: 10px 0; }</code>. </p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/add-a-google-plus-one-button-to-your-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Translating a WordPress Theme</title>
		<link>http://docs.appthemes.com/tutorials/translating-a-wordpress-theme/</link>
		<comments>http://docs.appthemes.com/tutorials/translating-a-wordpress-theme/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 06:30:36 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[glotpress]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[poedit]]></category>
		<category><![CDATA[translation]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://docs.appthemes.com/?p=1286</guid>
		<description><![CDATA[Our themes are built to easily translate all text into your native language. They leverage the same gettext libraries as WordPress uses which means seamless integration and similar instructions. When it comes to localizing/translating any of our themes, we recommend using PoEdit. You can find full details on how to do this on our How [...]]]></description>
			<content:encoded><![CDATA[<p>Our themes are built to easily translate all text into your native language. They leverage the same gettext libraries as WordPress uses which means seamless integration and similar instructions.</p>
<p>When it comes to localizing/translating any of our themes, we recommend using <a href="http://www.poedit.net/" target="_blank">PoEdit</a>. </p>
<p>You can find full details on how to do this on our <a href="http://www.appthemes.com/blog/how-to-translate-a-wordpress-theme/" target="_blank">How to Localize a WordPress Theme</a> blog post.</p>
]]></content:encoded>
			<wfw:commentRss>http://docs.appthemes.com/tutorials/translating-a-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 11/23 queries in 0.007 seconds using disk: basic
Object Caching 599/634 objects using disk: basic

Served from: docs.appthemes.com @ 2012-05-16 16:11:39 -->
