<?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>Eric Martin &#187; WordPress</title>
	<atom:link href="http://www.ericmmartin.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericmmartin.com</link>
	<description></description>
	<lastBuildDate>Tue, 23 Aug 2011 13:36:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>WP-Paginate 1.2 Released</title>
		<link>http://www.ericmmartin.com/wp-paginate-1-2-released/</link>
		<comments>http://www.ericmmartin.com/wp-paginate-1-2-released/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 21:53:33 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=1030</guid>
		<description><![CDATA[WP-Paginate 1.2 has been released and is available on the WordPress Plugin Directory. WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site. WP-Paginate supports pagination for both posts and comments. Changes in 1.2: Added RTL language support Fixed a comments pagination bug Changed language domain name [...]]]></description>
			<content:encoded><![CDATA[<p>WP-Paginate 1.2 has been released and is available on the <a href="http://wordpress.org/extend/plugins/wp-paginate/">WordPress Plugin Directory</a>.</p>
<p>WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site. WP-Paginate supports pagination for both posts and comments.</p>
<p><span id="more-1030"></span><br />
Changes in 1.2:</p>
<ul>
<li>Added RTL language support</li>
<li>Fixed a comments pagination bug</li>
<li>Changed language domain name from wp_paginate to wp-paginate (this will affect translation file names)</li>
</ul>
<p>If you have any feedback, feel free to leave a comment here. If you have a question or issue, please post it in the <a href='http://wordpress.org/tags/wp-paginate#postform'>WordPress support forum</a>.</p>
<h3>Links:</h3>
<ul>
<li><a href='http://www.ericmmartin.com/projects/wp-paginate/'>Project Page</a></li>
<li><a href='http://wordpress.org/extend/plugins/wp-paginate/'>WordPress Page</a> (Download, FAQ and Installation details)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/wp-paginate-1-2-released/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>SimpleModal Login 1.0 Released</title>
		<link>http://www.ericmmartin.com/simplemodal-login-1-0-released/</link>
		<comments>http://www.ericmmartin.com/simplemodal-login-1-0-released/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 18:30:19 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SimpleModal]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=1008</guid>
		<description><![CDATA[I'm happy to (finally) announce the release of SimpleModal Login 1.0! I've been working off-and-on since the beginning of the 2010 on adding new features, such as user registration, password reset and an activity indicator. All of those features are included in 1.0 as well as the following: Added support for Peter's Login Redirect plugin [...]]]></description>
			<content:encoded><![CDATA[<p>I'm happy to (finally) announce the release of SimpleModal Login 1.0!</p>
<p><img src="http://www.ericmmartin.com/wordpress/wp-content/uploads/2010/09/screenshot-1-300x240.png" alt="" title="SimpleModal Login Default" width="150" height="120" /> <img src="http://www.ericmmartin.com/wordpress/wp-content/uploads/2010/09/screenshot-5-300x224.png" alt="" title="SimpleModal Login OSX" width="160" height="120" /></p>
<p>I've been working off-and-on since the beginning of the 2010 on adding new features, such as user registration, password reset and an activity indicator. All of those features are included in 1.0 as well as the following:</p>
<p><span id="more-1008"></span></p>
<ul>
<li>Added support for <a href="http://wordpress.org/extend/plugins/peters-login-redirect/">Peter's Login Redirect</a> plugin</li>
<li>Added additional error handling</li>
<li>Added Keyboard Shortcut option and feature (<code>Ctrl+Alt+L</code>)</li>
<li>Removed the 'Redirect after login?' option</li>
<li>Updated POT file (I18n/simplemodal-login.pot)</li>
<li>Added plugin update logic</li>
<li>Upgraded to <a href="http://www.ericmmartin.com/projects/simplemodal/">SimpleModal</a> 1.4</li>
<li>Added additional screenshots</li>
<li>Added filters for each form (login, register, password reset) output HTML to allow for customization</li>
</ul>
<p>If you have any feedback, feel free to leave a comment here. If you have a question or issue, please post it in the <a href='http://wordpress.org/tags/simplemodal-login#postform'>WordPress support forum</a>.</p>
<h3>Links:</h3>
<ul>
<li><a href='http://www.ericmmartin.com/projects/simplemodal-login/'>Project Page</a></li>
<li><a href='http://wordpress.org/extend/plugins/simplemodal-login/'>WordPress Page</a> (Download, FAQ and Installation details)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/simplemodal-login-1-0-released/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>SimpleModal Login Released</title>
		<link>http://www.ericmmartin.com/simplemodal-login-released/</link>
		<comments>http://www.ericmmartin.com/simplemodal-login-released/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 14:58:21 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SimpleModal]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=925</guid>
		<description><![CDATA[I'd like to introduce SimpleModal Login, a modal Ajax login for WordPress which utilizes jQuery and the SimpleModal jQuery plugin. SimpleModal Login handles logging into WordPress but does not handle user registration or the forgot password functions. SimpleModal Login also supports themes, something I'm planning on adding to the SimpleModal Contact Form plugin as well. [...]]]></description>
			<content:encoded><![CDATA[<p>I'd like to introduce <a href="http://www.ericmmartin.com/projects/simplemodal-login/">SimpleModal Login</a>, a modal Ajax login for WordPress which utilizes jQuery and the SimpleModal jQuery plugin.</p>
<p>SimpleModal Login handles logging into WordPress but does not handle user registration or the forgot password functions.</p>
<p>SimpleModal Login also supports themes, something I'm planning on adding to the <a href="http://www.ericmmartin.com/projects/smcf/">SimpleModal Contact Form</a> plugin as well.</p>
<p>If you have any feedback or issues, please let me know!</p>
<p><a href="http://wordpress.org/extend/plugins/simplemodal-login/" class="button">Download</a> <a href="http://www.ericmmartin.com/projects/simplemodal-login/" class="button">Project Page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/simplemodal-login-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Halloween Desktop Wallpaper</title>
		<link>http://www.ericmmartin.com/wordpress-halloween-desktop-wallpaper/</link>
		<comments>http://www.ericmmartin.com/wordpress-halloween-desktop-wallpaper/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 04:14:43 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=878</guid>
		<description><![CDATA[Since I'm not planning on carving another WordPress pumpkin this year, I thought I'd create some desktop wallpapers of the pumpkin I carved last year for WordPress fans to show their holiday spirit. 1024x768 1280x800 1280x1024 1440x900 1680x1050 1920x1200 1024x768 1280x800 1280x1024 1440x900 1680x1050 1920x1200 320x480 (iPhone/iPod) 320x480 (iPhone/iPod) The wallpapers are free for you [...]]]></description>
			<content:encoded><![CDATA[<p>Since I'm not planning on carving another <a href="http://www.flickr.com/photos/ericmmartin/sets/72157608499192623/">WordPress pumpkin</a> this year, I thought I'd create some desktop wallpapers of the pumpkin <a href="http://www.ericmmartin.com/wordpress-pumpkin/">I carved last year</a> for WordPress fans to show their holiday spirit.</p>
<p><img class="hide" src="http://www.ericmmartin.com/wordpress/wp-content/uploads/2009/10/wp-halloween-tn.jpg"/></p>
<p><span id="more-878"></span></p>
<div class="wallpaper">
<img src="http://www.ericmmartin.com/wordpress/wp-content/uploads/2009/10/wp-halloween-tn.jpg"/></p>
<ul>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-1024x768.jpg">1024x768</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-1280x800.jpg">1280x800</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-1280x1024.jpg">1280x1024</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-1440x900.jpg">1440x900</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-1680x1050.jpg">1680x1050</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-1920x1200.jpg">1920x1200</a></li>
</ul>
</div>
<div class="wallpaper">
<img src="http://www.ericmmartin.com/wordpress/wp-content/uploads/2009/10/wp-halloween-dark-tn.jpg"/></p>
<ul>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-dark-1024x768.jpg">1024x768</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-dark-1280x800.jpg">1280x800</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-dark-1280x1024.jpg">1280x1024</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-dark-1440x900.jpg">1440x900</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-dark-1680x1050.jpg">1680x1050</a></li>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-dark-1920x1200.jpg">1920x1200</a></li>
</ul>
</div>
<p><br/></p>
<div class="wallpaper">
<img src="http://www.ericmmartin.com/wordpress/wp-content/uploads/2009/10/wp-halloween-iphone-tn.jpg"/></p>
<ul>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-320x480.jpg">320x480 (iPhone/iPod)</a></li>
</ul>
</div>
<div class="wallpaper">
<img src="http://www.ericmmartin.com/wordpress/wp-content/uploads/2009/10/wp-halloween-dark-iphone-tn.jpg"/></p>
<ul>
<li><a href="http://emm-projects.googlecode.com/files/wp-halloween-dark-320x480.jpg">320x480 (iPhone/iPod)</a></li>
</ul>
</div>
<p><br/><br />
The wallpapers are <strong>free</strong> for you to download and use. If you'd like to show your appreciation, feel free to spread the word or <a href="http://bit.ly/emm-donate">dontate $1</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/wordpress-halloween-desktop-wallpaper/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>5 Tips For Using jQuery with WordPress</title>
		<link>http://www.ericmmartin.com/5-tips-for-using-jquery-with-wordpress/</link>
		<comments>http://www.ericmmartin.com/5-tips-for-using-jquery-with-wordpress/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 17:59:50 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=832</guid>
		<description><![CDATA[Having used jQuery and WordPress together on a number of plugins and themes, I thought I'd share some tips that I have learned. The following are 5 clear, concise, and relevant tips that you should know when using jQuery in your WordPress Theme or Plugin. 1. Use wp_enqueue_script() The traditional way to include jQuery in [...]]]></description>
			<content:encoded><![CDATA[<p>Having used jQuery and WordPress together on a number of plugins and themes, I thought I'd share some tips that I have learned. The following are 5 clear, concise, and relevant tips that you should know when using jQuery in your WordPress Theme or Plugin.</p>
<h4>1. Use wp_enqueue_script()</h4>
<p>The traditional way to include jQuery in an HTML page is with the <code>script</code> tag. When working with WordPress, you should *never* do this. To avoid conflicts and other potential problems, you'll want to load jQuery using the following code:</p>
<p><span id="more-832"></span></p>
<pre><code>function my_init() {
	if (!is_admin()) {
		wp_enqueue_script('jquery');
	}
}
add_action('init', 'my_init');
</code></pre>
<p>You can replace <code>my_init</code> with something more meaningful, but choose a unique name to avoid conflicts. For plugin development, add the code in your plugin file, otherwise, add this code to your theme's <code>functions.php</code> file. The <code>is_admin()</code> check is to prevent script queuing on your admin pages.</p>
<p>WordPress References:</p>
<ul>
<li><a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_script()</a></li>
<li><a href="http://codex.wordpress.org/Function_Reference/add_action">add_action()</a></li>
<li><a href="http://codex.wordpress.org/Conditional_Tags#The_Administration_Panels">is_admin()</a></li>
</ul>
<h4>2. Load jQuery from the Google AJAX Library</h4>
<p>Since WordPress includes jQuery, calling <code>wp_enqueue_script('jquery');</code> will automatically load the jQuery file located in <code>wp-includes/js/jquery/jquery.js</code>. </p>
<p>If you want to load jQuery from the <a href="http://code.google.com/apis/ajaxlibs/">Google AJAX Library</a>, you'll need to modify the code as follows:</p>
<pre><code>function my_init() {
	if (!is_admin()) {
		// comment out the next two lines to load the local copy of jQuery
		wp_deregister_script('jquery');
		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2');
		wp_enqueue_script('jquery');
	}
}
add_action('init', 'my_init');
</code></pre>
<p>There are a <a href="http://www.google.com/search?q=google+jquery">number of reasons</a> why you would want to use the Google AJAX Library to load jQuery, but remember, Google has been down before, so be ready to comment out the first two lines if necessary.</p>
<p>Note: As mentioned by Milan in the comments, there are existing plugins, such as <a href="http://wordpress.org/extend/plugins/use-google-libraries/">Use Google Libraries</a>, that will do this for you.</p>
<h4>3. Load jQuery in the footer</h4>
<p>Using the code in the previous two tips, jQuery will, by default, be inserted into the <code>head</code> of your HTML page. If you would prefer to have jQuery inserted at the bottom of your page, you'll need to use the <code>$in_footer</code> parameter for the <code>wp_enqueue_script()</code> function. The modified code:</p>
<pre><code>function my_init() {
	if (!is_admin()) {
		wp_deregister_script('jquery');

		// load the local copy of jQuery in the footer
		wp_register_script('jquery', '/wp-includes/js/jquery/jquery.js', false, '1.3.2', true);

		// or load the Google API copy in the footer
		//wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2', true);

		wp_enqueue_script('jquery');
	}
}
add_action('init', 'my_init');
</code></pre>
<p>As with the choice to use the Google AJAX Library, there are <a href="http://developer.yahoo.com/performance/rules.html#js_bottom">reasons</a> why you'd want to load jQuery at the bottom of your page. Note: if a script is loaded using <code>wp_enqeue_script()</code> that lists jQuery as a dependency and has <code>$in_footer</code> set to <code>false</code>, WordPress will place jQuery in the <code>head</code> instead of the footer, regardless of the <code>$in_footer</code> value for jQuery.</p>
<h4>4. Add jQuery as a dependency</h4>
<p>You've got jQuery loading and now you want to include a script that uses it. This is where the <code>wp_enqueue_script()</code> function really comes in handy. By passing an array of dependencies for the <code>$deps</code> parameter, WordPress will automatically manage the order and placement of your <code>script</code> tags.</p>
<p>For example, if you have a JavaScript file in your theme that leveraged jQuery, the following code would ensure that your file is loaded correctly:</p>
<pre><code>function my_init() {
	if (!is_admin()) {
		wp_deregister_script('jquery');
		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2', true);
		wp_enqueue_script('jquery');

		// load a JS file from my theme: js/theme.js
		wp_enqueue_script('my_script', get_bloginfo('template_url') . '/js/theme.js', array('jquery'), '1.0', true);
	}
}
add_action('init', 'my_init');
</code></pre>
<p>The previous code example would load jQuery from the Google AJAX Library, place it in the footer of your page and then include your theme.js file. The <code>$deps</code> array allows for multiple dependencies and helps you manage the scripts that are loaded on your site.</p>
<h4>5. Proper jQuery coding conventions</h4>
<p>All of the previous steps are nullified if proper jQuery coding conventions aren't followed. The most common issue I see with jQuery and WordPress is the misuse of the <code>$</code> variable.</p>
<p>It is important to know that the version of jQuery that comes with WordPress automatically calls the <code>jQuery.noConflict();</code> function, which gives control of the <code>$</code> variable back to whichever library first implemented it. If you are loading a different copy of jQuery, you'll need to manually call <code>jQuery.noConflict();</code>, if necessary, from one of your JavaScript files.</p>
<p>As a general rule, you should not use the <code>$</code> variable for jQuery unless you have used one of the <a href="http://docs.jquery.com/Using_jQuery_with_Other_Libraries#Referencing_Magic_-_Shortcuts_for_jQuery">shortcuts</a>. The following is an example of how to shortcut jQuery to safely use the <code>$</code> variable:</p>
<pre><code>jQuery(function ($) {
	/* You can safely use $ in this code block to reference jQuery */
});
</code></pre>
<div class="summary">
<p>This is the second article in a series of tips and tricks for customizing and improving your WordPress site. Be sure to <a href="http://feeds.ericmmartin.com/emm/">subscribe</a> or bookmark this site.</p>
<p>If you have any other related WordPress tips, feel free to leave them in the comments below.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/5-tips-for-using-jquery-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>WP-Paginate Released</title>
		<link>http://www.ericmmartin.com/wp-paginate-released/</link>
		<comments>http://www.ericmmartin.com/wp-paginate-released/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 16:35:33 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=803</guid>
		<description><![CDATA[After releasing the pagination function for WordPress code, I decided to make it easier to use by creating an official WordPress Plugin. So, I'd like to introduce WP-Paginate, a simple and flexible pagination plugin which provides users with better navigation for your WordPress site. If you have any feedback or issues, please let me know! [...]]]></description>
			<content:encoded><![CDATA[<p>After releasing the <a href="http://www.ericmmartin.com/pagination-function-for-wordpress/">pagination function for WordPress</a> code, I decided to make it easier to use by creating an official WordPress Plugin.</p>
<p>So, I'd like to introduce <a href="http://www.ericmmartin.com/projects/wp-paginate/">WP-Paginate</a>, a simple and flexible pagination plugin which provides users with better navigation for your WordPress site.</p>
<p>If you have any feedback or issues, please let me know!</p>
<p><a href="http://wordpress.org/extend/plugins/wp-paginate/" class="button">Download</a> <a href="http://www.ericmmartin.com/projects/wp-paginate/" class="button">Project Page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/wp-paginate-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pagination Function For WordPress</title>
		<link>http://www.ericmmartin.com/pagination-function-for-wordpress/</link>
		<comments>http://www.ericmmartin.com/pagination-function-for-wordpress/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 20:23:19 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=742</guid>
		<description><![CDATA[A modified version of this code, with extra features, is now available as a WordPress plugin: WP-Paginate The way WordPress handles post pages is to provide links to the previous posts and next posts, using previous_posts_link() and next_posts_link() respectively. When redesigning my site, I wanted to paginate the post pages to provide users with a [...]]]></description>
			<content:encoded><![CDATA[<div class="note">A modified version of this code, with extra features, is now available as a WordPress plugin: <a href="http://www.ericmmartin.com/projects/wp-paginate/">WP-Paginate</a>
</div>
<p>The way WordPress handles post pages is to provide links to the previous posts and next posts, using <code>previous_posts_link()</code> and <code>next_posts_link()</code> respectively. When redesigning my site, I wanted to paginate the post pages to provide users with a more usable, intuitive interface.</p>
<p>While there are a number of WordPress plugins that enable pagination, I chose to write my own. I wanted a something that was flexible enough to be used in a number of different situations, but most of all I wanted the experience and challenge of writing my own pagination function.</p>
<p><span id="more-742"></span></p>
<h4>Overview</h4>
<p>The code, while fairly compact, is a bit too much to display, so I've provided a download that contains the following:</p>
<ul>
<li><code>paginate.txt</code> - The pagination functions to place in your theme's <code>functions.php</code> file</li>
<li><code>paginate.css</code> - The CSS to put in your theme's <code>style.css</code> file</li>
<li><code>readme.txt</code> - The details about the pagination code</li>
</ul>
<p><a class="button" href="http://emm-projects.googlecode.com/files/emm_paginate.zip">Download</a></p>
<h4>Demo</h4>
<p>To see the pagination in action, check out the links at the bottom of the <a href="http://www.ericmmartin.com/photography/">Photography</a> or <a href="http://www.ericmmartin.com/blog/">Blog</a> pages on this site.</p>
<h4>Usage</h4>
<p>After you have downloaded the files and placed the code in your theme, you'll need to replace the WordPress next/previous links with this new pagination function.</p>
<p>For example, in the default theme's index.php file, you'd replace:</p>
<pre><code>&lt;div class="navigation"&gt;
    &lt;div class="alignleft"&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;
    &lt;div class="alignright"&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p>With:</p>
<pre><code>&lt;?php if (function_exists("emm_paginate")) {
    emm_paginate();
} ?&gt;
</code></pre>
<p>The <code>emm_paginate()</code> function takes one optional argument, in query string format, which allows you to customize the output. See below for details on the available options.</p>
<h4>Options</h4>
<ul>
<li><code>page</code> [Number:null]<br/>The current page. This function will automatically determine the value.</li>
<li><code>pages</code> [Number:null]<br/>The total number of pages. This function will automatically determine the value.</li>
<li><code>range</code> [Number:3]<br/>The number of page links to show before and after the current page.</li>
<li><code>gap</code> [Number:3]<br/>The minimum number of pages before a gap is replaced with ellipses (...).</li>
<li><code>anchor</code> [Number:1]<br/>The number of links to always show at begining and end of pagination.</li>
<li><code>before</code> [String:'&lt;div class="emm-paginate"&gt;']<br/>The html or text to add before the pagination links.</li>
<li><code>after</code> [String:'&lt;/div&gt;']<br/>The html or text to add after the pagination links.</li>
<li><code>title</code> [String:'__("Pages:")']<br/>The text to display before the pagination links.</li>
<li><code>next_page</code> [String:'__("&amp;raquo;")']<br/>The text to use for the next page link.</li>
<li><code>previous_page</code> [String:'__("&amp;laquo")']<br/>The text to use for the previous page link.</li>
<li><code>echo</code> [Number:1]<br/>To return the code instead of echo'ing, set this to 0 (zero).</li>
</ul>
<p>If you have any questions or find any issues, please let me know. Also, if you use the code, leave a comment with a link to your site so we can check it out!</p>
<div class="summary">This is the first article in a series of tips and tricks for customizing and improving your WordPress site. Be sure to <a href="http://feeds.ericmmartin.com/emm/">subscribe</a> or bookmark this site.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/pagination-function-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>SimpleModal Contact Form (SMCF) 1.2.4 Released</title>
		<link>http://www.ericmmartin.com/simplemodal-contact-form-smcf-1-2-4-released/</link>
		<comments>http://www.ericmmartin.com/simplemodal-contact-form-smcf-1-2-4-released/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 04:48:44 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SimpleModal]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=737</guid>
		<description><![CDATA[SimpleModal Contact Form (SMCF) 1.2.4 includes the following changes: Upgraded SimpleModal to 1.3 Fixed the bug that was supposed to be fixed in SMCF 1.2.3 ;) Moved the JavaScript loading to the WordPress init() function Optimized smcf.js variables to reduce file-size Moved close (X) link HTML from smcf.php to smcf.js (the SimpleModal closeHTML option) Other [...]]]></description>
			<content:encoded><![CDATA[<p>SimpleModal Contact Form (SMCF) 1.2.4 includes the following changes:</p>
<ul>
<li>Upgraded SimpleModal to 1.3</li>
<li>Fixed the bug that was supposed to be fixed in SMCF 1.2.3 ;)</li>
<li>Moved the JavaScript loading to the WordPress <code>init()</code> function</li>
<li>Optimized smcf.js variables to reduce file-size</li>
<li>Moved close (X) link HTML from smcf.php to smcf.js (the SimpleModal closeHTML option)</li>
</ul>
<p><span id="more-737"></span><br />
Other than those updates, nothing major was changed. I've been working on the plans for a new version of SMCF with lots of new features, so stay tuned.</p>
<p>For more information please visit the <a href='http://www.ericmmartin.com/projects/smcf/'>SMCF Plugin Page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/simplemodal-contact-form-smcf-1-2-4-released/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>New Version of EricMMartin.com</title>
		<link>http://www.ericmmartin.com/new-version-of-ericmmartin-com/</link>
		<comments>http://www.ericmmartin.com/new-version-of-ericmmartin-com/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 19:32:10 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=709</guid>
		<description><![CDATA[After months of design changes and WordPress theme customizations, I'm happy to introduce the latest version of EricMMartin.com! I've actually been working on this redesign, on again, off again, for the last year or so. Although the design has been through a number of changes, the technologies I wanted to build the site with have [...]]]></description>
			<content:encoded><![CDATA[<p>After months of design changes and WordPress theme customizations, I'm happy to introduce the latest version of <a href="http://www.ericmmartin.com">EricMMartin.com</a>!</p>
<p>I've actually been working on this redesign, on again, off again, for the last year or so. Although the design has been through a number of changes, the technologies I wanted to build the site with have remained the same: <a href="http://wordpress.org">WordPress</a> and <a href="http://jquery.com">jQuery</a>.</p>
<p>So, I'd love to hear your thoughts on the new design - please leave a comment. If you didn't see the previous version, here's a screenshot of what it looked like:</p>
<p><span id="more-709"></span><br />
<a href="http://www.ericmmartin.com/wordpress/wp-content/uploads/2009/08/EricMMartin_old.png"><img src="http://www.ericmmartin.com/wordpress/wp-content/uploads/2009/08/EricMMartin_old-300x300.png" alt="Older version of EricMMartin.com" width="300" height="300" /></a></p>
<p>Go ahead and say it, it's OK, the previous version was ugly. Hopefully the new design is easier on the eyes.</p>
<p>As a side note, I'll be starting a series or articles that will cover the redesign and development process in more detail. The articles will focus on topics such as creating a custom WordPress theme, client-side development using jQuery, and website performance. If you are interested in any of those topics, be sure to <a href="http://feeds.ericmmartin.com/emm/">subscribe</a> or bookmark this site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/new-version-of-ericmmartin-com/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WordPress bug &#8211; duplicate page entries</title>
		<link>http://www.ericmmartin.com/wordpress-bug-duplicate-page-entries/</link>
		<comments>http://www.ericmmartin.com/wordpress-bug-duplicate-page-entries/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 18:16:14 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=288</guid>
		<description><![CDATA[This bug was fixed in WordPress 2.8 [changeset] While working on a new site design, I found an interesting bug in WordPress 2.7. I created two new pages to use as "Front page displays", one called Blog and one called Home. To create the pages, I clicked on Pages > Add New, entered a Title [...]]]></description>
			<content:encoded><![CDATA[<div class="note">This bug was fixed in WordPress 2.8 [<a href="http://core.trac.wordpress.org/changeset/10251">changeset</a>]</div>
<p>While working on a new site design, I found an interesting bug in WordPress 2.7. I created two new pages to use as "Front page displays", one called Blog and one called Home. To create the pages, I clicked on Pages > Add New, entered a Title and clicked Publish.</p>
<p>I then went to my Reading Settings (Settings > Reading) and set the static Front and Posts page to the pages I just created. Going back to my site, I tested out the new static pages only to find they didn't work.</p>
<p><span id="more-288"></span></p>
<p>After a lot of time and troubleshooting, I noticed on the Pages screen that there were two copies of each page I had created - with one still labeled as a Draft. After even more time troubleshooting, I finally discovered the issue. Unlike the Posts page, the Publish and Save Draft buttons are not disabled during an autosave. So, when I entered the Page title and clicked Publish, the autosave and publish requests were happening at the same time.</p>
<p>I opened a WordPress <a href="http://trac.wordpress.org/ticket/8710">ticket</a> and submitted a <a href="http://trac.wordpress.org/attachment/ticket/8710/autosave.patch">patch</a>. The patch was applied by azaozz, but it looks like it won't be available until WordPress 2.8. To fix this bug yourself, open <code>/wp-includes/js/autosave.js</code> and change all occurrences of <code>#submitpost</code> to <code>.submitbox</code>:</p>
<pre><code>function autosave_enable_buttons() {
	jQuery(".submitbox :button:disabled, .submitbox :submit:disabled").attr('disabled', '');
}

function autosave_disable_buttons() {
	jQuery(".submitbox :button:enabled, .submitbox :submit:enabled").attr('disabled', 'disabled');
	setTimeout(autosave_enable_buttons, 5000); // Re-enable 5 sec later.  Just gives autosave a head start to avoid collisions.
}
</code></pre>
<p>Now the buttons will be disabled during an autosave, just like it does on the Posts page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/wordpress-bug-duplicate-page-entries/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

