<?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>Geek the Freak Out! It&#039;s Joseph Hinson! &#187; Tips</title>
	<atom:link href="http://geekoutwith.me/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekoutwith.me</link>
	<description>Doing right by the internet since I learned how.</description>
	<lastBuildDate>Fri, 03 Feb 2012 13:58:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Customize Password Protected Text Using Custom Fields [WordPress]</title>
		<link>http://geekoutwith.me/2011/08/customize-password-protected-text-using-custom-fields-wordpress/</link>
		<comments>http://geekoutwith.me/2011/08/customize-password-protected-text-using-custom-fields-wordpress/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 03:00:43 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1411</guid>
		<description><![CDATA[I haven&#8217;t posted in a very long time, but as soon as I stumbled on this functionality I had to share it immediately, so here it is:
It is possible to add a filter function to add new text to the password protected page. The code to add to your functions.php files is as follows:
&#60;?php
add_filter( '&#8230;]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted in a very long time, but as soon as I stumbled on this functionality I had to share it immediately, so here it is:</p>
<p>It is possible to add a filter function to add new text to the password protected page. The code to add to your functions.php files is as follows:</p>
<pre>&lt;?php
add_filter( 'the_password_form', 'custom_password_form' );
function custom_password_form() {
	global $post;
	$label = 'pwbox-'.( empty( $post-&gt;ID ) ? rand() : $post-&gt;ID );
	$o = '&lt;form action="' . get_option('siteurl') . '/wp-pass.php" method="post"&gt;
	' . __( "This post is password protected and this is what I want to say about that. To view it please enter your password below:" ) . '
	&lt;label for="' . $label . '"&gt;' . __( "Password:" ) . ' &lt;/label&gt;&lt;input name="post_password" id="' . $label . '" type="password" size="20" /&gt;&lt;input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /&gt;
	&lt;/form&gt;
	';
	return $o;
}
?&gt;</pre>
<h3>But with just a tiny bit more coding&#8230;</h3>
<p>&#8230;and an if statement, you can add a check to see if a custom field exists, and if it does, to spit it out instead of using the default text. Added code is in <span style="background-color: #ffff99;">Yellow.</span></p>
<pre>add_filter( 'the_password_form', 'custom_password_form' );
function custom_password_form() {
	global $post;
	$label = 'pwbox-'.( empty( $post-&gt;ID ) ? rand() : $post-&gt;ID );
	$o = '&lt;form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post"&gt;<span style="background-color: #ffff99;">';</span>
<span style="background-color: #ffff99;"> if (get_post_meta($post-&gt;ID, 'password-prompt-text', true)) {</span>
<span style="background-color: #ffff99;"> $o .= get_post_meta($post-&gt;ID, 'password-prompt-text', true);</span>
<span style="background-color: #ffff99;"> } else {</span>
<span style="background-color: #ffff99;"> $o .='&lt;p&gt;'. __( "This post is password protected. To view it please enter your password below:" ).'&lt;/p&gt;';</span>
<span style="background-color: #ffff99;"> }</span>
	<span style="background-color: #ffff99;">$o .= '</span>&lt;label for="' . $label . '"&gt;' . __( "Password:" ) . ' &lt;/label&gt;&lt;input name="post_password" id="' . $label . '" type="password" size="20" /&gt;&lt;input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /&gt;
	&lt;/form&gt;';
	return $o;
}</pre>
<p>The variable <code>$o</code> begins return a string. My if statement in yellow, interrupts the string with an if statement to see if the post has a custom field called <code>password-prompt-text</code>, and if it does, uses it instead of the text &#8220;This post is password protected&#8230;&#8221;.</p>
<p>Using this method, you can provide HTML into the description, so go crazy. I used <code>H2</code> for title, then a paragraph for description. The cool thing about this, is that because of the else: it degrades nicely if you don&#8217;t have the custom field added to the post.</p>
<p>Hope that helps somebody.</p>
<p><span style="font-size: small;">Credit to <a href="http://profiles.wordpress.org/mfields/">Michael Fields</a> for the original code, Googled and found <a href="http://wordpress.org/support/topic/how-do-i-change-password-protected-text">here</a>. Also mentioned at <a href="http://www.wordimpressed.com/wordpress/change-wordpress-default-password-protected-text/">WordImpressed</a>.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2011/08/customize-password-protected-text-using-custom-fields-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Resizer! &#8211; resize objects that are greater than a specified width</title>
		<link>http://geekoutwith.me/2011/02/jquery-resizer-resize-objects-that-are-greater-than-a-specified-width/</link>
		<comments>http://geekoutwith.me/2011/02/jquery-resizer-resize-objects-that-are-greater-than-a-specified-width/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 04:35:49 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Adventures]]></category>
		<category><![CDATA[Geek Out Lab]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1390</guid>
		<description><![CDATA[Today I launched the new design of Escape From Cubicle Nation, which I&#8217;m very proud to have worked on. Props to Brian Morykon for the design, Joseph Hinson for the code.
My last order of business in coding the site was that some of the Youtube videos and embeds had been inserted at a width of 640 pix&#8230;]]></description>
			<content:encoded><![CDATA[<p>Today I launched the new design of Escape From Cubicle Nation, which I&#8217;m very proud to have worked on. Props to Brian Morykon for the design, Joseph Hinson for the code.</p>
<p>My last order of business in coding the site was that some of the Youtube videos and embeds had been inserted at a width of 640 pixels, which was 90 pixels wider than the content area. With CSS, the options are really only to choose <code>overflow: hidden;</code>, which then only cuts off the content that is wider, instead of resizing it. So, I wrote a quick little script that some folks might find helpful. May I introduce <strong><em>jQuery resizer</em></strong>.</p>
<p>Here&#8217;s the actual function for my fellow geeks:</p>
<pre>function resizer( selectors, w ) {
 jQuery(selectors).each(function() {
 var owidth = jQuery(this).width(); var oheight = jQuery(this).height();
 if (owidth &gt; w) {
 var newH = (oheight * w / owidth);
 jQuery(this).attr({
 width: w,
 height: newH
 });
 }; // endif
 });
}</pre>
<p>Essentially the function loops through every selector you give it, checks it against the width you give it, and if it&#8217;s wider, it will recalculate the attributes of width and height based on their original values to scale the image down, it takes two attributes, the selector, and the width. The function can be called like so:</p>
<pre>resizer('.content iframe', 500);</pre>
<p>Additionally, you can give it a comma separated list of selectors, like so:</p>
<pre>resizer('.content iframe, .content embed, .content object, .content img', 500);</pre>
<p>So, the very straightforward, bottom line usage is as follows:</p>
<pre>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" charset="utf-8" src="appropriate-path/jq-resizer.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
jQuery(document).ready(function() {
 resizer('iframe, img', 550);
});
&lt;/script&gt;
</pre>
<p>You can see a <a href="http://geekoutwith.me/lab/resizer.html" target="_blank">quick demo</a> here.</p>
<h3 class="button"><a title="jQuery Resizer - Resize most html elements quickly and easily." href="http://geekoutwith.me/lab/files/jq-resizer.js.zip">Click to download the js file (in a zip).</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2011/02/jquery-resizer-resize-objects-that-are-greater-than-a-specified-width/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>What to do if a WordPress automatic upgrade fails</title>
		<link>http://geekoutwith.me/2011/01/what-to-do-if-wordpress-automatic-upgrade-fails/</link>
		<comments>http://geekoutwith.me/2011/01/what-to-do-if-wordpress-automatic-upgrade-fails/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 02:54:58 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1350</guid>
		<description><![CDATA[If you&#8217;ve ever been upgrading a WordPress installation and had it fail, leaving you in the dark depths of maintenance mode, you&#8217;ll agree with me that it can be quite a headache. Much like a site launch or a database move, it can take either 5 minutes, or 5 hours, but it never seems to fall in b&#8230;]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever been upgrading a WordPress installation and had it fail, leaving you in the dark depths of maintenance mode, you&#8217;ll agree with me that it can be quite a headache. Much like a site launch or a database move, it can take either 5 minutes, or 5 hours, but it never seems to fall in between.</p>
<p>So if you start the WordPress upgrade and it gets locked up and leaves you hangin&#8217;, here&#8217;s what you do:</p>
<p><strong style="font-size:80;">Note: You should always backup your database and wp-content directory before beginning a WordPress update, even an automatic one. Also, you should ALWAYS rename a default theme like TwentyTen to a different name or it might get overwritten in an automatic update.<br />
</strong><br />
1) Download the latest version of WordPress from <a href="http://wordpress.org">WordPress.org</a></p>
<p>2) With an FTP program (FileZilla for Mac/PC, Cyberduck for Mac; I prefer Transmit, bit it ain&#8217;t free). Upload the entire WordPress install, except for the wp-content folder. This should overwrite all files in the WordPress Core. Unless you&#8217;ve messed with the core (which you shouldn&#8217;t have), this will not affect your files.</p>
<p>3) Remove the file called &#8220;.maintenance&#8221; from your site&#8217;s root directory (this is what is triggering the maintenance message).</p>
<p>4) Navigate to the appropriate wp-admin folder. WordPress will ask you to upgrade the database. Click the button and your back to where you were before, only now your upgraded.</p>
<p>I hope someone finds this helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2011/01/what-to-do-if-wordpress-automatic-upgrade-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy way to check for child pages (children) in WordPress</title>
		<link>http://geekoutwith.me/2010/12/easy-way-to-check-for-child-pages-children-in-wordpress/</link>
		<comments>http://geekoutwith.me/2010/12/easy-way-to-check-for-child-pages-children-in-wordpress/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 04:06:56 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1339</guid>
		<description><![CDATA[I was trying to create a sub-navigation menu that would only show if there were child pages in WordPress the other day, but to my knowledge, there is no has_children() or has_child() type of conditional available. I&#8217;m sure it&#8217;s because there are so many other ways to check for children.&#8230;]]></description>
			<content:encoded><![CDATA[<p>I was trying to create a sub-navigation menu that would only show if there were child pages in WordPress the other day, but to my knowledge, there is no <code>has_children()</code> or <code>has_child()</code> type of conditional available. I&#8217;m sure it&#8217;s because there are so many other ways to check for children. Still, it would be nice. But here&#8217;s how I did it, feel free to copy my code.</p>
<p>In any single.php template, use this code:</p>
<h3>Using <code>$post->ID</code></h3>
<pre>&lt;?php

$pages = get_posts('numberposts=-1&amp;orderby=menu_order&amp;order=ASC&amp;post_type=page&amp;post_status=publish&amp;post_parent='.$post-&gt;ID);

if (!empty($pages)) {

$has_children = true; // Page has children

} ?&gt;</pre>
<h3>Using <code>get_the_ID()</code></h3>
<pre>&lt;?php

$the_ID = get_the_ID();

$pages = get_posts('numberposts=-1&amp;orderby=menu_order&amp;order=ASC&amp;post_type=page&amp;post_status=publish&amp;post_parent='.$the_ID);
if (!empty($pages)) {
$has_children = true; // Page has children

} ?&gt;</pre>
<p>Now you&#8217;re even set to loop through your pages to create your sub-menu.</p>
<p>Hope someone finds that helpful</p>
<h3>Further Reading</h3>
<ul>
<li><a href="http://codex.wordpress.org/Template_Tags/get_posts">WordPress Template Tag: get_posts()</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/12/easy-way-to-check-for-child-pages-children-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick demo of the CSS Extractor for WordPress Comments</title>
		<link>http://geekoutwith.me/2010/10/quick-demo-of-the-css-extractor-for-wordpress-comments/</link>
		<comments>http://geekoutwith.me/2010/10/quick-demo-of-the-css-extractor-for-wordpress-comments/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 03:32:39 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Geek Out Lab]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1322</guid>
		<description><![CDATA[Below is a quick video that shows how the CSS Extractor tool can be used to quickly pull css classes from your site&#8217;s markup, specifically with the WordPress comments, that are generated dynamically.

]]></description>
			<content:encoded><![CDATA[<p>Below is a quick video that shows how the <a href="http://geekoutwith.me/lab/css-extractor/">CSS Extractor tool</a> can be used to quickly pull css classes from your site&#8217;s markup, specifically with the WordPress comments, that are generated dynamically.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="568" height="380" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/lA3lJfXQ3g8?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="568" height="380" src="http://www.youtube.com/v/lA3lJfXQ3g8?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/10/quick-demo-of-the-css-extractor-for-wordpress-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery clear onfocus function</title>
		<link>http://geekoutwith.me/2010/09/jquery-onfocus-function/</link>
		<comments>http://geekoutwith.me/2010/09/jquery-onfocus-function/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 18:32:28 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1310</guid>
		<description><![CDATA[I haven&#8217;t posted since I released the quick posts plugin, so I wanted to drop a little something that might be useful to other front-end guys.
Have you ever clicked on a form, and it didn&#8217;t clear on focus? That&#8217;s annoying, so what I usually do is add onfocus="this.value='';", but t&#8230;]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted since I released <a href="http://geekoutwith.me/quick-posts">the quick posts plugin</a>, so I wanted to drop a little something that might be useful to other front-end guys.</p>
<p>Have you ever clicked on a form, and it didn&#8217;t clear on focus? That&#8217;s annoying, so what I usually do is add <code>onfocus="this.value='';"</code>, but the problem there is when a user clicks away without entering anything, they don&#8217;t know what the field said previously (this is especially problematic if you&#8217;re not using or hiding the <code>label</code> tag. So the solution is to add an <code>if</code> statement to the onfocus and onblur handlers. This gets annoying if you have several text fields, so with the beauty of jQuery, I created this quick function to handle it automatically. As long as a value is given to the text field, it will do the work for you.</p>
<pre>
jQuery(document).ready(function() {
		jQuery('input[type=text]').each( function(i) {
			var t = jQuery(this);
			var thisval = t.val();
			t.blur( function() {
				if (t.val() == '') t.val(thisval);
			}); // end blur function
			t.focus( function() {
				if (t.val() == thisval) t.val('');
			});// end focus function
		}); //END each function
	}); // END document ready function
</pre>
<p>I&#8217;m using this script on my site, and you can see it in action on the search field.</p>
<p>If you&#8217;d like to copy and paste that into your <code>head</code> or just above your <code>body</code> tag, go right ahead. Alternatively, you can download a zip of the javascript file here:</p>
<p><a href="http://geekoutwith.me/wp-content/uploads/2010/09/jq-clearonfocus.js.zip">jQuery Clear on Focus Script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/09/jquery-onfocus-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to add multiple pages at once with WordPress</title>
		<link>http://geekoutwith.me/2010/06/how-to-add-multiple-pages-at-once-with-wordpress/</link>
		<comments>http://geekoutwith.me/2010/06/how-to-add-multiple-pages-at-once-with-wordpress/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 20:45:59 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp_insert_posts]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1259</guid>
		<description><![CDATA[I have since written a plugin for this purpose, you may read about it here: WordPress Plugin: Quick Posts
Ok folks, this will be short. If you want to add several pages at once, I created a little script for you.
Here it is:
&#60;?php
 include ('wp-blog-header.php');
 $newPages = array(
 'Page 1' =&#62; 'Lo&#8230;]]></description>
			<content:encoded><![CDATA[<p style="padding: 10px; background: #FFFF99;">I have since written a plugin for this purpose, you may read about it here: <a href="http://geekoutwith.me/quick-posts">WordPress Plugin: Quick Posts</a></p>
<p>Ok folks, this will be short. If you want to add several pages at once, I created a little script for you.</p>
<h3>Here it is:</h3>
<pre>&lt;?php
 <span style="background-color: #ffff99;">include ('wp-blog-header.php');</span>
 <span style="background-color: #ccffcc;">$newPages = array(</span>
 'Page 1' =&gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
 'Page 2' =&gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
 'Page 3' =&gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
 'Page 4' =&gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
 );
 <span style="background-color: #ccffff;">foreach($newPages as $pagename =&gt; $content) :</span>

 $postarr = array(
 'post_title'         =&gt;     $pagename,
 'post_content'         =&gt;     $content,
 'post_status'        =&gt;    'publish', <span style="background-color: #99ccff;">// can be changed to 'draft', 'publish', 'pending', or 'future'</span>
 'post_author'        =&gt;    1, <span style="background-color: #99ccff;">// post author 1 is admin, can be changed to the ID of the post author</span>
 'post_type'            =&gt;    'page', <span style="background-color: #99ccff;">// can also use 'post' here.</span>
// 'post_parent'            =&gt;    '22', <span style="background-color: #99ccff;">// (completely optional) you can assign a parent ID to create child pages.</span>
 );
<span style="background-color: #ffcc99;"> wp_insert_post($postarr); ?&gt;</span>
<span style="background-color: #ffffff;"> &lt;p&gt;Added &lt;?php echo $pagename?&gt;.&lt;/p&gt;</span>
 &lt;?php endforeach; ?&gt;</pre>
<h3>And here&#8217;s how it works:</h3>
<ol>
<li>the <span style="background-color: #ffff99;">include wp_blog_header()</span> is pulling in the file wp_blog_header.php, which gets all the important data from your WordPress blog, allowing you to access the database (<strong>very important</strong>).</li>
<li>the <span style="background-color: #ccffcc;">$newpages</span> variable is storing an array that is created in the next 4 lines.</li>
<li> The <span style="background-color: #ccffff;">foreach</span> cycles through the array, assigning $pagename to the left side of the = and $content to the right, so whatever you put to the left side of the = will be your page title, whatever you put to the right side will be your content (<em>simple enough</em>).</li>
<li>The <a href="http://codex.wordpress.org/Function_Reference/wp_insert_post"><span style="background-color: #ffcc99;">function wp_insert_post()</span> </a>is called, passing the parameter of the array that was created in <span style="background-color: #ccffcc;">step 2</span>.</li>
</ol>
<p>That&#8217;s it, your new pages have been added. Be very careful not to reload the page, or navigate to this page again, or it will duplicate the pages, which can be quite frustrating to straighten out. But that&#8217;s it. It really is that easy. You can also see my <span style="background-color: #99ccff;">comments in blue.</span></p>
<p>I might make a plugin that you can drop into a site to enable users to frame out a site with the pages needed and whatnot. Maybe I&#8217;ll make that my next project, anyway, hopefully you found it useful, if you&#8217;d like to download the php file, you can get it below:</p>
<p><a href="http://geekoutwith.me/wp-content/uploads/2010/06/insertposts.php_.zip">insertposts.php</a></p>
<p>Put this file in your root directory (so like: http://geekoutwith.me/insertposts.php). If you put it somewhere else, you&#8217;ll have to change the path of the include for <span style="background-color: #ffff99;">wp-blog-header.php</span></p>
<p style="padding: 10px; background: #FFFF99;">I have since written a plugin for this purpose, you may read about it here: <a href="http://geekoutwith.me/quick-posts">WordPress Plugin: Quick Posts</a></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/06/how-to-add-multiple-pages-at-once-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to Quickly Create Reusable Color Palettes in TextMate</title>
		<link>http://geekoutwith.me/2010/06/how-to-quickly-create-reusable-color-palettes-in-textmate/</link>
		<comments>http://geekoutwith.me/2010/06/how-to-quickly-create-reusable-color-palettes-in-textmate/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 17:32:00 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Geek Out]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1256</guid>
		<description><![CDATA[Below is a quick video tutorial of using Mac OS&#8217; built-in color picker to create color palletes for use in your CSS documents.

]]></description>
			<content:encoded><![CDATA[<p>Below is a quick video tutorial of using Mac OS&#8217; built-in color picker to create color palletes for use in your CSS documents.</p>
<p><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='560' height='345'><param name='movie' value='http://screenr.com/Content/assets/screenr_1116090935.swf' /><param name='flashvars' value='i=81776' /><param name='allowFullScreen' value='true' /><embed src='http://screenr.com/Content/assets/screenr_1116090935.swf' flashvars='i=81776' allowFullScreen='true' width='560' height='345' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/06/how-to-quickly-create-reusable-color-palettes-in-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoshop Screencast: Creating Torn Edges</title>
		<link>http://geekoutwith.me/2010/05/photoshop-tip-creating-torn-edges/</link>
		<comments>http://geekoutwith.me/2010/05/photoshop-tip-creating-torn-edges/#comments</comments>
		<pubDate>Fri, 28 May 2010 19:39:57 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[distressed]]></category>
		<category><![CDATA[grunge]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[torn edges]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1251</guid>
		<description><![CDATA[I was recently working on a project and came up with a decently automated solution for creating grunge torn edges in photoshop&#8230;and here it is:

]]></description>
			<content:encoded><![CDATA[<p>I was recently working on a project and came up with a decently automated solution for creating grunge torn edges in photoshop&#8230;and here it is:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="345" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="i=74050" /><param name="allowFullScreen" value="true" /><param name="src" value="http://screenr.com/Content/assets/screenr_1116090935.swf" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="345" src="http://screenr.com/Content/assets/screenr_1116090935.swf" allowfullscreen="true" flashvars="i=74050"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/05/photoshop-tip-creating-torn-edges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoshop Screencast: How to use the defringe tool</title>
		<link>http://geekoutwith.me/2010/05/photoshop-screencast-how-to-use-the-defringe-tool/</link>
		<comments>http://geekoutwith.me/2010/05/photoshop-screencast-how-to-use-the-defringe-tool/#comments</comments>
		<pubDate>Thu, 27 May 2010 17:49:54 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[defringe]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1249</guid>
		<description><![CDATA[I was working on an email blast for a client when I remembered how effective the defringe tool is, and though I don&#8217;t explain it too thoroughly in this screencast, it might be helpful for you.

]]></description>
			<content:encoded><![CDATA[<p>I was working on an email blast for a client when I remembered how effective the defringe tool is, and though I don&#8217;t explain it too thoroughly in this screencast, it might be helpful for you.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="345" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="i=63357" /><param name="allowFullScreen" value="true" /><param name="src" value="http://screenr.com/Content/assets/screenr_1116090935.swf" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="345" src="http://screenr.com/Content/assets/screenr_1116090935.swf" allowfullscreen="true" flashvars="i=63357"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/05/photoshop-screencast-how-to-use-the-defringe-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

