<?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>scriptygoddess &#187; WordPress: Lessons Learned</title>
	<atom:link href="http://www.scriptygoddess.com/archives/category/wordpress/wordpress-lessons-learned/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com</link>
	<description></description>
	<lastBuildDate>Thu, 08 Dec 2011 18:23:44 +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>WordPress Objects</title>
		<link>http://www.scriptygoddess.com/archives/2011/10/12/mwordpress-objects/</link>
		<comments>http://www.scriptygoddess.com/archives/2011/10/12/mwordpress-objects/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 05:18:21 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1693</guid>
		<description><![CDATA[For some custom templates, I need to get information from various WordPress objects, either relating to the current page, or from elsewhere in the site. The best way to do that is to get the object in a variable then do a print_r($objectvar) to see all the information included with that object. Even though I [...]
Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/23/wordpress-pagination-woes-solved-i-hope/' rel='bookmark' title='WordPress Pagination Woes (solved? I hope?)'>WordPress Pagination Woes (solved? I hope?)</a> <small>For awhile now, I&#039;ve run into pagination problems when doing...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/' rel='bookmark' title='WordPress edit_post_link doesn&#039;t display (fix)'>WordPress edit_post_link doesn&#039;t display (fix)</a> <small>I recently ran into this problem &#8211; and I see...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>For some custom templates, I need to get information from various WordPress objects, either relating to the current page, or from elsewhere in the site. The best way to do that is to get the object in a variable then do a <strong>print_r($objectvar)</strong> to see all the information included with that object. Even though I use these objects almost on a daily basis, I forget what&#039;s in them, and running print_r to remind myself what the object elements are is a pain. So I&#039;m storing them here for future reference.</p>
<h2>get_queried_object</h2>
<p><strong>Scenario:</strong> On a custom taxonomy page. (In this case the custom taxonomy is called &#034;Product Category&#034; &#8211; the specific category/term page we&#039;re on is &#034;Accessories&#034;. To get specific details on the term &#8211; I used <a href="http://codex.wordpress.org/Function_Reference/get_queried_object">get_queried_object</a> (which is a pretty useless codex page &#8211; there&#039;s barely any information there)</p>
<p><code>$term = $wp_query-&gt;get_queried_object();</code></p>
<p>This is what $term looks like:</p>
<p><code>stdClass Object<br />
(<br />
[term_id] =&gt; 5<br />
[name] =&gt; Accessories<br />
[slug] =&gt; accessories<br />
[term_group] =&gt; 0<br />
[term_taxonomy_id] =&gt; 5<br />
[taxonomy] =&gt; product-category<br />
[description] =&gt;<br />
[parent] =&gt; 0<br />
[count] =&gt; 7<br />
)</code></p>
<p>get_queried_object on a page looks something like this:</p>
<p><code>[ID] =&gt; 6<br />
[post_author] =&gt; 1<br />
[post_date] =&gt; 2010-03-29 05:38:46<br />
[post_date_gmt] =&gt; 2010-03-29 05:38:46<br />
[post_content] =&gt; This is my page content. Woo hoo! Hi.<br />
[post_title] =&gt; My Totally Awesome Page<br />
[post_excerpt] =&gt;<br />
[post_status] =&gt; publish<br />
[comment_status] =&gt; open<br />
[ping_status] =&gt; open<br />
[post_password] =&gt;<br />
[post_name] =&gt; my-totally-awesome-page<br />
[to_ping] =&gt;<br />
[pinged] =&gt;<br />
[post_modified] =&gt; 2010-10-04 16:43:41<br />
[post_modified_gmt] =&gt; 2010-10-04 22:43:41<br />
[post_content_filtered] =&gt;<br />
[post_parent] =&gt; 0<br />
[guid] =&gt; http://www.mydomain.com/?page_id=6<br />
[menu_order] =&gt; 3<br />
[post_type] =&gt; page<br />
[post_mime_type] =&gt;<br />
[comment_count] =&gt; 1<br />
[ancestors] =&gt; Array<br />
(<br />
)<br />
[filter] =&gt; page</code></p>
<p>On a category archive page &#8211; this is what the object looks like:</p>
<p><code>[term_id] =&gt; 3<br />
[name] =&gt; Press Releases<br />
[slug] =&gt; press-releases<br />
[term_group] =&gt; 0<br />
[term_taxonomy_id] =&gt; 3<br />
[taxonomy] =&gt; category<br />
[description] =&gt;<br />
[parent] =&gt; 0<br />
[count] =&gt; 21<br />
[cat_ID] =&gt; 3<br />
[category_count] =&gt; 21<br />
[category_description] =&gt;<br />
[cat_name] =&gt; Press Releases<br />
[category_nicename] =&gt; press-releases<br />
[category_parent] =&gt; 0</code></p>
<h2>get_categories</h2>
<p><strong>Scenario</strong>: We want to get a list of terms in a custom taxonomy. Here are our $args:</p>
<p><code>'parent' =&gt; (A PRENT CAT ID),<br />
'hide_empty' =&gt; 0,<br />
'taxonomy' =&gt; 'location'</code></p>
<p>Then we pull in the list via <a href="http://codex.wordpress.org/Function_Reference/get_categories">get_categories</a></p>
<p><code>$mycats = get_categories($args)</code></p>
<p>This is one of the objects in $mycats (Can get one via a for each loop&#8230;)</p>
<p><code>[term_id] =&gt; 1393<br />
[name] =&gt; Central Florida<br />
[slug] =&gt; central-florida<br />
[term_group] =&gt; 0<br />
[term_taxonomy_id] =&gt; 1401<br />
[taxonomy] =&gt; location<br />
[description] =&gt;<br />
[parent] =&gt; 27<br />
[count] =&gt; 3<br />
[cat_ID] =&gt; 1393<br />
[category_count] =&gt; 3<br />
[category_description] =&gt;<br />
[cat_name] =&gt; Central Florida<br />
[category_nicename] =&gt; central-florida<br />
[category_parent] =&gt; 27</code></p>
<h2>get_term_by</h2>
<p><strong>Scenario: </strong>get information on a specific term using <a href="http://codex.wordpress.org/Function_Reference/get_term_by">get_term_by</a></p>
<p>The example below was done using get_term_by(&#039;id&#039;&#8230; etc. Here is what the object looks like that I got back:</p>
<p><code>[term_id] =&gt; 24<br />
[name] =&gt; Northern California<br />
[slug] =&gt; northern-california<br />
[term_group] =&gt; 0<br />
[term_taxonomy_id] =&gt; 24<br />
[taxonomy] =&gt; location<br />
[description] =&gt;<br />
[parent] =&gt; 23<br />
[count] =&gt; 24</code></p>
<p>I&#039;ll continue to add to this post over time. I&#039;ve had it sitting in draft forever &#8211; but figured it was time to hit the publish button already. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I think it&#039;s interesting to note that in the above objects &#8211; we&#039;re looking at a particular term in a taxonomy &#8211; but depending on how we obtained it &#8211; will also depend on what elements are in that object. ie. the presence of &#034;cat_ID&#034; in one &#034;category_count&#034; (not sure how this is different than &#034;count&#034;, also not really sure what &#034;term_taxonomy_id&#034; is but I notice that it doesn&#039;t always equal term_id &#8211; so these two are not one and the same&#8230;</p>
<h2>get_children</h2>
<p>I use <a href="http://codex.wordpress.org/Function_Reference/get_children">get_children</a> very often to get all attached images to a post. When I do, the code usually looks like this:</p>
<p><code>$images = get_children(array(<br />
'post_type' =&gt; 'attachment',<br />
'post_status' =&gt; null,<br />
'post_parent' =&gt; $post-&gt;ID,<br />
'post_mime_type' =&gt; 'image',<br />
'order' =&gt; 'ASC',<br />
'orderby' =&gt; 'menu_order ID'));</code></p>
<p>$images will have multiple objects in it (if there are multiple images attached) here&#039;s an example of one of them:</p>
<p><code>[ID] =&gt; 1171<br />
[post_author] =&gt; 2<br />
[post_date] =&gt; 2011-10-02 21:11:39<br />
[post_date_gmt] =&gt; 2011-10-03 03:11:39<br />
[post_content] =&gt; (FYI - this is the image description)<br />
[post_title] =&gt; IMG_2168.jpg<br />
[post_excerpt] =&gt; (FYI - This is the image caption)<br />
[post_status] =&gt; inherit<br />
[comment_status] =&gt; open<br />
[ping_status] =&gt; open<br />
[post_password] =&gt;<br />
[post_name] =&gt; img_2168-jpg<br />
[to_ping] =&gt;<br />
[pinged] =&gt;<br />
[post_modified] =&gt; 2011-10-02 21:11:39<br />
[post_modified_gmt] =&gt; 2011-10-03 03:11:39<br />
[post_content_filtered] =&gt;<br />
[post_parent] =&gt; 1173<br />
[guid] =&gt; http://www.domain.com/wp-content/uploads/2011/10/IMG_2168.jpg<br />
[menu_order] =&gt; 0<br />
[post_type] =&gt; attachment<br />
[post_mime_type] =&gt; image/jpeg<br />
[comment_count] =&gt; 0<br />
[filter] =&gt; raw</code></p>
<p>Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/23/wordpress-pagination-woes-solved-i-hope/' rel='bookmark' title='WordPress Pagination Woes (solved? I hope?)'>WordPress Pagination Woes (solved? I hope?)</a> <small>For awhile now, I&#039;ve run into pagination problems when doing...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/' rel='bookmark' title='WordPress edit_post_link doesn&#039;t display (fix)'>WordPress edit_post_link doesn&#039;t display (fix)</a> <small>I recently ran into this problem &#8211; and I see...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2011/10/12/mwordpress-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving from Typepad to WordPress</title>
		<link>http://www.scriptygoddess.com/archives/2011/05/26/moving-from-typepad-to-wordpress/</link>
		<comments>http://www.scriptygoddess.com/archives/2011/05/26/moving-from-typepad-to-wordpress/#comments</comments>
		<pubDate>Thu, 26 May 2011 21:16:39 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1683</guid>
		<description><![CDATA[I recently had a client who wanted to move from TypePad to WordPress. An interesting procedure, let me tell you. The most critical help came from this post on foliovision.com. Of particular note, was the way they pulled down all the images from the Typepad site &#8211; using HTTrack. My original plan was to use [...]
Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/04/29/the-mysteriously-disappearing-wordpress-3-1-admin-bar/' rel='bookmark' title='The mysteriously disappearing WordPress 3.1 Admin Bar'>The mysteriously disappearing WordPress 3.1 Admin Bar</a> <small>I&#039;ve run into this problem a few times now and...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/' rel='bookmark' title='WordPress emails being sent by {username}@box###.bluehost.com (fix)'>WordPress emails being sent by {username}@box###.bluehost.com (fix)</a> <small>If you are hosted on Bluehost and you&#039;re using WordPress,...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/' rel='bookmark' title='WordPress edit_post_link doesn&#039;t display (fix)'>WordPress edit_post_link doesn&#039;t display (fix)</a> <small>I recently ran into this problem &#8211; and I see...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I recently had a client who wanted to move from TypePad to WordPress. An interesting procedure, let me tell you. The most critical help came from <a href="http://foliovision.com/2008/11/17/typepad-to-wordpress">this post on foliovision.com</a>. Of particular note, was the way they pulled down all the images from the Typepad site &#8211; using <a href="http://www.httrack.com/">HTTrack</a>.</p>
<p>My original plan was to use this plugin: <a href="http://wordpress.org/extend/plugins/cache-images/">Cache Images</a> &#8211;  to import the pictures. The reason being that I needed the images attached to their various posts for the template &#8211; which is what that plugin does in addition to loading all externally referenced images onto your own server. But the way Typepad is storing the images now, the plugin doesn&#039;t really work. The images are referenced without a file extension at the end &#8211; which is what that plugin specifically uses to search for images. So that is why I used HTTrack to pull down the images first.</p>
<p>After I had a folder of all the images for the site &#8211; I put that up on a DIFFERENT server. (I know, a little confusing but hang in there with me)</p>
<p>I then used the <a href="http://wordpress.org/extend/plugins/search-regex/">search regex plugin</a> to change references to the images without an extension to the temporary location of those images on my other server &#8211; but this time WITH the .jpg extensions:</p>
<p>Search string (regex options turned on)<br />
<strong>#src=&#034;http://www.MY-CLIENTS-TYPEPAD-DOMAIN.com/\.a/([^\s]+(?=))&#034;#i</strong><br />
and replaced it with:<br />
<strong>src=&#034;http://MYREMOTESERVER.COM/DIRECTORYNAME/$1.jpg&#034;</strong></p>
<p>Now with all the references using the appropriate .jpg extension and pointing to MY server, I was then able to go back and use the &#034;Cache Images&#034; plugin to pull down the images and attach them to their respective posts.</p>
<p>Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/04/29/the-mysteriously-disappearing-wordpress-3-1-admin-bar/' rel='bookmark' title='The mysteriously disappearing WordPress 3.1 Admin Bar'>The mysteriously disappearing WordPress 3.1 Admin Bar</a> <small>I&#039;ve run into this problem a few times now and...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/' rel='bookmark' title='WordPress emails being sent by {username}@box###.bluehost.com (fix)'>WordPress emails being sent by {username}@box###.bluehost.com (fix)</a> <small>If you are hosted on Bluehost and you&#039;re using WordPress,...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/' rel='bookmark' title='WordPress edit_post_link doesn&#039;t display (fix)'>WordPress edit_post_link doesn&#039;t display (fix)</a> <small>I recently ran into this problem &#8211; and I see...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2011/05/26/moving-from-typepad-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The mysteriously disappearing WordPress 3.1 Admin Bar</title>
		<link>http://www.scriptygoddess.com/archives/2011/04/29/the-mysteriously-disappearing-wordpress-3-1-admin-bar/</link>
		<comments>http://www.scriptygoddess.com/archives/2011/04/29/the-mysteriously-disappearing-wordpress-3-1-admin-bar/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 18:02:19 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1677</guid>
		<description><![CDATA[I&#039;ve run into this problem a few times now and it always takes me a minute or two to remember what caused it and how to fix it. So first of all, if you have NEVER seen the admin bar, make sure you: 1) have it activated in your profile to show where you want [...]
Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/' rel='bookmark' title='WordPress edit_post_link doesn&#039;t display (fix)'>WordPress edit_post_link doesn&#039;t display (fix)</a> <small>I recently ran into this problem &#8211; and I see...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/' rel='bookmark' title='WordPress emails being sent by {username}@box###.bluehost.com (fix)'>WordPress emails being sent by {username}@box###.bluehost.com (fix)</a> <small>If you are hosted on Bluehost and you&#039;re using WordPress,...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/23/wordpress-pagination-woes-solved-i-hope/' rel='bookmark' title='WordPress Pagination Woes (solved? I hope?)'>WordPress Pagination Woes (solved? I hope?)</a> <small>For awhile now, I&#039;ve run into pagination problems when doing...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#039;ve run into this problem a few times now and it always takes me a minute or two to remember what caused it and how to fix it. So first of all, if you have NEVER seen the admin bar, make sure you:<br />
1) have it activated in your profile to show where you want it to (ie. viewing the site, the WordPress admin, or both).<br />
2) Make sure both wp_head(); is in your header.php and wp_footer(); is in your footer.php</p>
<p>Another possibility is that a plugin is misbehaving &#8211; so you can try disabling plugins &#8211; but before you do that &#8211; (if you have a lot of plugins certainly) try this next step first!</p>
<p>In my case the problem usually stems from the fact that I like to keep my WordPress files in their own directory, and then run the site itself in the root directory. However, if you view your site before you move it to the root diretory&#8230; the cookie that determines whether or not the admin bar should be displayed may have already been set &#8211; and it will be set to your WordPress directory &#8211; not the directory (or root) that your site is now living. The fix is simple: clear your cookies for your site, (which will effectively log you out too if you haven&#039;t logged out already) &#8211; log back in &#8211; and then it should be fixed.</p>
<p>Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/' rel='bookmark' title='WordPress edit_post_link doesn&#039;t display (fix)'>WordPress edit_post_link doesn&#039;t display (fix)</a> <small>I recently ran into this problem &#8211; and I see...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/' rel='bookmark' title='WordPress emails being sent by {username}@box###.bluehost.com (fix)'>WordPress emails being sent by {username}@box###.bluehost.com (fix)</a> <small>If you are hosted on Bluehost and you&#039;re using WordPress,...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/23/wordpress-pagination-woes-solved-i-hope/' rel='bookmark' title='WordPress Pagination Woes (solved? I hope?)'>WordPress Pagination Woes (solved? I hope?)</a> <small>For awhile now, I&#039;ve run into pagination problems when doing...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2011/04/29/the-mysteriously-disappearing-wordpress-3-1-admin-bar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Pagination Woes (solved? I hope?)</title>
		<link>http://www.scriptygoddess.com/archives/2011/02/23/wordpress-pagination-woes-solved-i-hope/</link>
		<comments>http://www.scriptygoddess.com/archives/2011/02/23/wordpress-pagination-woes-solved-i-hope/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 08:41:19 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1674</guid>
		<description><![CDATA[For awhile now, I&#039;ve run into pagination problems when doing custom templates and custom queries. I think I&#039;m finally starting to figure out all the little nuances. For starters, in most cases this will get pagination working on a custom template with a standard query_posts(): $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; That&#039;s the key [...]
Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/' rel='bookmark' title='WordPress edit_post_link doesn&#039;t display (fix)'>WordPress edit_post_link doesn&#039;t display (fix)</a> <small>I recently ran into this problem &#8211; and I see...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>For awhile now, I&#039;ve run into pagination problems when doing custom templates and custom queries. I think I&#039;m finally starting to figure out all the little nuances. For starters, in most cases this will get pagination working on a custom template with a standard <a href="http://codex.wordpress.org/Function_Reference/query_posts">query_posts()</a>:</p>
<p><code>$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;</code></p>
<p>That&#039;s the key to getting the next_posts_link() and previous_posts_link() working. So you have this on your custom template:</p>
<p><code>$paged = get_query_var( 'page' ) ? get_query_var( 'page' ) : 1;<br />
$args = array(<br />
	'post_type'=>'my_custom_post_type',<br />
	'paged' => $paged<br />
);<br />
query_posts( $args );</code></p>
<p>And then this will paginate the content:</p>
<p><code>next_posts_link('Older Posts');<br />
previous_posts_link('Newer Posts');</code></p>
<p>If you need to make use of any information regarding the current page (not referencing your custom query &#8211; then you&#039;ll probably need this after you loop through your custom query:</p>
<p><code>wp_reset_query();</code></p>
<p>However, in my most recent use, <strong>get_query_var(&#039;paged&#039;)</strong> always returned &#034;1&#034; no matter what page I was on. After much searching, I finally found out, if you&#039;re using a custom template for the homepage, and you&#039;re using a custom query for the posts displayed on that page, then you have to do this instead:</p>
<p><code>$paged = (get_query_var('page')) ? get_query_var('page') : 1;</code></p>
<p>(note the use of &#034;<strong>page</strong>&#034; vs. &#034;<strong>paged</strong>&#034;)<br />
Why these two values are different, I&#039;m not sure, but they are&#8230; and this was the only thing that got pagination working on the custom template for the homepage.</p>
<p>Then there was another wrinkle I discovered. If you&#039;re doing a <a href="http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query">custom select query</a> to get posts &#8211; then <a href="http://wordpress.org/support/topic/custom-loop-pagination">this forum post</a> has this important code to get the pagination working &#8211; as there are some variables that do not get populated with a custom select query, and are needed for pagination:</p>
<p><code>$total = "your custom select query goes here, but without LIMIT and OFFSET, so the total number of posts that match the query can be counted";<br />
$totalposts = $wpdb->get_results($total, OBJECT);<br />
$ppp = intval(get_query_var('posts_per_page'));<br />
$wp_query->found_posts = count($totalposts);<br />
$wp_query->max_num_pages = ceil($wp_query->found_posts / $ppp);<br />
$paged = (get_query_var('page')) ? get_query_var('page') : 1;<br />
// or use the below for custom select queries used on a homepage custom template<br />
//$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;<br />
$offset = ($paged-1) * $ppp;<br />
$wp_query->request = "your query again, but with the LIMIT and OFFSET as follows: LIMIT $ppp OFFSET $offset";<br />
$pageposts = $wpdb->get_results($wp_query->request, OBJECT);</code></p>
<p>Then, after you foreach loop &#8211; you can use the next_posts_link(), previous_posts_link() to show the pagination&#8230;</p>
<p>Another tidbit I discovered along with this&#8230; when doing a custom select query loop, you&#039;ll have something similar to this:</p>
<p><code>foreach ($pageposts as $post):<br />
setup_postdata($post);<br />
... stuff for your template like &lt;h1&gt;&lt;?php the_title(); ?&gt;<br />
etc...<br />
endforeach;</code></p>
<p>If you use a different variable name other than &#034;$post&#034; in that foreach call &#8211; it&#039;s not going to work 100% right. Tags like the_title() will display the title for the current page (that&#039;s using the custom template) not the page/post within your custom loop.</p>
<p>I realize this is not an in-depth how-to type post, still I hope this information helps someone struggling with the same things I was <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/' rel='bookmark' title='WordPress edit_post_link doesn&#039;t display (fix)'>WordPress edit_post_link doesn&#039;t display (fix)</a> <small>I recently ran into this problem &#8211; and I see...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2011/02/23/wordpress-pagination-woes-solved-i-hope/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>WordPress edit_post_link doesn&#039;t display (fix)</title>
		<link>http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/</link>
		<comments>http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 20:46:49 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1673</guid>
		<description><![CDATA[I recently ran into this problem &#8211; and I see an old thread on the forums about this. The last post there says to make sure you&#039;re logged in. (I can assure I was). But, that&#039;s not what was causing the problem. Here are the steps that got me to the problem: Set up a [...]
Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/' rel='bookmark' title='WordPress emails being sent by {username}@box###.bluehost.com (fix)'>WordPress emails being sent by {username}@box###.bluehost.com (fix)</a> <small>If you are hosted on Bluehost and you&#039;re using WordPress,...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I recently ran into this problem &#8211; and I see an <a href="http://wordpress.org/support/topic/edit_post_link-wont-show-up">old thread on the forums</a> about this. The last post there says to make sure you&#039;re logged in. (I can assure I was). But, that&#039;s not what was causing the problem. Here are the steps that got me to the problem:</p>
<p>Set up a new WordPress install. Logged in. Among a few other changes, I also changed the path for the site URL in the general settings to be the domain root (rather than the directory where WordPress was installed). I had made a custom theme with &#034;edit this page&#034; links&#8230; but they weren&#039;t showing up.</p>
<p>The reason: when I logged in the first time, the &#034;admin&#034; cookie that was set was specific to the directory where I installed WordPress &#8211; and did not apply to the root domain where it was now pointed. Since that change happened AFTER I was already logged in, WordPress did not update my cookie to include the root directory &#8211; so those pages could not see that I was in fact logged in.</p>
<p>The simplest fix is to log out and then log back in &#8211; which should set your cookies appropriately.</p>
<p>Related posts:<ol>
<li><a href='http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/' rel='bookmark' title='WordPress emails being sent by {username}@box###.bluehost.com (fix)'>WordPress emails being sent by {username}@box###.bluehost.com (fix)</a> <small>If you are hosted on Bluehost and you&#039;re using WordPress,...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2011/02/15/wordpress-edit_post_link-doesnt-display-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress emails being sent by {username}@box###.bluehost.com (fix)</title>
		<link>http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/</link>
		<comments>http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 06:25:24 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[bluehost]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Lessons learned]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1671</guid>
		<description><![CDATA[If you are hosted on Bluehost and you&#039;re using WordPress, you might have noticed the strange &#034;from&#034; address in the emails WordPress appears to be sending out. (they might look something like something@box123.bluehost.com) There is a very simple fix. The way Bluehost servers are setup, the address &#034;wordpress@{YOURDOMAIN.COM}&#034; needs to actually exist somehow in your [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you are hosted on Bluehost and you&#039;re using WordPress, you might have noticed the strange &#034;from&#034; address in the emails WordPress appears to be sending out. (they might look something like something@box123.bluehost.com) There is a very simple fix. The way Bluehost servers are setup, the address &#034;wordpress@{YOURDOMAIN.COM}&#034; needs to actually exist somehow in your account. Whether it be an actual email box, forwarder, autoresponder &#8211; either of those will work. However, do NOT set it up as an autoresponder that gives an error (that will completely shut down the emails going out). If you don&#039;t want people replying to &#034;wordpress@{YOURDOMAIN.COM}&#034; &#8211; you can just set up an autoresponder that says something like &#034;Sorry &#8211; no one here&#034;</p>
<p>If you don&#039;t like the &#034;wordpress@yourdomain.com&#034; email format either &#8211; you can change that address via a plugin like: <a href="http://wordpress.org/extend/plugins/wp-mailfrom/">wp-mailfrom</a>. However, again &#8211; whatever address you set it to in there &#8211; still needs to exist in your account. So if you prefer to have the from emails be ilovewordpress@yourdomain.com; make sure there is a ilovewordpress@yourdomain.com email account, forwarder or autoresponder.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2011/02/09/wordpress-emails-being-sent-by-usernamebox-bluehost-com-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>wp_nav_menu and &#039;container&#039; =&gt; false appears to not work</title>
		<link>http://www.scriptygoddess.com/archives/2010/10/09/wp_nav_menu-and-container-false-appears-to-not-work/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/10/09/wp_nav_menu-and-container-false-appears-to-not-work/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 02:37:39 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1648</guid>
		<description><![CDATA[A quick post to deal with a problem I&#039;ve come across again and again. I think I see the issue now, and wanted to make a note of what I *think* I&#039;m seeing. I&#039;ve also seen some complain about this same problem too. When you use wp_nav_menu() to create your nav bar, it will automatically [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>A quick post to deal with a problem I&#039;ve come across again and again. I think I see the issue now, and wanted to make a note of what I *think* I&#039;m seeing. I&#039;ve also seen some complain about this same problem too.</p>
<p>When you use <strong>wp_nav_menu() </strong>to create your nav bar, it will automatically add a container div that wraps around your navigation (which is presented in an unordered list). However, maybe you don&#039;t want that div there. According to the codex, you should only have to create your nav with <strong>&#039;container&#039; =&gt; false</strong> to get that container to go away, but for some reason, on what was seeming like random occasions, it would have no affect.</p>
<p>Well, I realized that the reason for this is because I had not yet set up my menu specifically. As soon as I went into the admin, created a menu, and assigned it to the same location wp_nav_menu() was calling, voila! The container went away.</p>
<p>I understand that if there is no menu set up yet, that wp_nav_menu() resorts to calling wp_list_pages(), but it should still pay attention to the arguments passed to the original function. However, it definitely seems like it is having issues. Not sure if that&#039;s a bug or not, but now I know (or at least I THINK I know) what&#039;s happening and how to fix it.</p>
<p>Reference: WordPress 3.0.1</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/10/09/wp_nav_menu-and-container-false-appears-to-not-work/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New WordPress 3.0 Navigation Menus &#8211; What you need to know to get started</title>
		<link>http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 21:40:08 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1640</guid>
		<description><![CDATA[One feature I&#039;m extremely excited to see in WordPress 3.0 is the new &#034;Menus&#034; feature. It&#039;s pretty easy to add and use in your theme. I was having trouble finding documentation on it, so this is not &#034;official&#034; but this is as far as I can tell, how you can go about using it. First, [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One feature I&#039;m extremely excited to see in WordPress 3.0 is the new &#034;Menus&#034; feature. It&#039;s pretty easy to add and use in your theme. I was having trouble finding documentation on it, so this is not &#034;official&#034; but this is as far as I can tell, how you can go about using it.</p>
<p>First, if your theme doesn&#039;t already have a functions.php file, go ahead and create one. Then add the following PHP code:</p>
<p><code>register_nav_menus( array(<br />
		'mainnav' => 'Main Nav'<br />
	) );</code></p>
<p>&#034;mainnav&#034; (which is the menu&#039;s &#034;slug&#034; and shown as &#034;Main Nav&#034; in the admin) is just what I came up with &#8211; but you can name it whatever you want, and you can have multiple nav menus if you want. Just register them all in that functions file. Here&#039;s an example with 3 nav menus:</p>
<p><code>register_nav_menus( array(<br />
		'mainnav' => 'Main Nav',<br />
		'navtwo' => 'Nav Bar Two',<br />
'navthree' => 'Nav Bar Three',<br />
	) );</code></p>
<p>That&#039;s it &#8211; What that does is tell your theme you&#039;re going to have three different/unique menus. You can use them as many times as you want, wherever you want in your theme.</p>
<p>You&#039;ll create your menus in the WordPress admin &#8211; this is pretty self explanatory (<a href="http://codex.wordpress.org/Appearance_Menus_SubPanel">and described pretty well here</a>) &#8211; add pages, categories, custom links that point outside your blog, whatever you want. Give the menu a name and &#034;apply&#034; it to a location:</p>
<p><img src="http://www.scriptygoddess.com/wp-content/uploads/2010/06/Screen-shot-2010-06-23-at-Jun-23-3.27.27-PM.png" alt="" title="Screen shot 2010-06-23 at Jun 23  3.27.27 PM" width="296" height="309" class="aligncenter size-full wp-image-1641" /></p>
<p>Now &#8211; to add it to your theme&#8230; You get a whole bunch of options so if you need the menu to display one way in one location, and a different way in another location &#8211; you can do that! </p>
<p>Here&#039;s a simple example where I&#039;ve stripped out the nav &#034;wrapper&#034; and any automatic styling it would add &#8211; just drop this in your theme file where you want the menu to show up (like your header.php, or footer.php&#8230; wherever)</p>
<p><code>$args =  array( 'menu' => 'mainnav', 'container' => false, 'menu_id' => false, 'menu_class' => false);<br />
wp_nav_menu($args);</code></p>
<p>But you can insert an ID or a class. <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">This is detailed pretty well here.</a></p>
<p>I&#039;ve already started to use this and it&#039;s great. Clients have been really happy that they can now manage their own menus without requiring edits to a template.</p>
<p><strong>Updated to add:</strong> As pointed out by Stephen in the comments &#8211; if you are creating themes for general public use and you&#039;re not sure what version of WordPress your userbase will be running &#8211; you will want to wrap these new functions in a &#034;<em>if (function_exists(&#039;new-fancy-function-name-here&#039;)) { &#8230; }</em>&#034;. <a href="http://www.scratch99.com/2010/06/practical-theme-support-for-wordpress-3-0-menus/">He has details on this on his site here.</a> In there, he linked to another article that would have helped me out a lot had Google liked the page more so I could have found it when I was working on this recently &#8211; but there&#039;s some <a href="http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus">additional reading here on how to set all this up</a> (it&#039;s a lot more in depth than I got into &#8211; I guess my version is the &#034;Cliff Notes&#034;) <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The Blogger to WordPress move from hell!</title>
		<link>http://www.scriptygoddess.com/archives/2010/05/21/the-blogger-to-wordpress-move-from-hell/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/05/21/the-blogger-to-wordpress-move-from-hell/#comments</comments>
		<pubDate>Sat, 22 May 2010 03:08:13 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1638</guid>
		<description><![CDATA[One of the projects I&#039;ve been working on recently is to move a client&#039;s Blogger blog into WordPress. The blog is a few years old, but it has an ENORMOUS amount of comments. Doing the standard import from within WordPress wasn&#039;t bringing over all the posts and it barely scratched the surface of bringing over [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One of the projects I&#039;ve been working on recently is to move a client&#039;s Blogger blog into WordPress. The blog is a few years old, but it has an ENORMOUS amount of comments. Doing the standard import from within WordPress wasn&#039;t bringing over all the posts and it barely scratched the surface of bringing over the comments.</p>
<p>I found <a href="http://artlung.com/blog/2010/03/02/migrating-an-old-blogger-blog-to-wordpress/">this post on ArtLung: Migrating an old Blogger Blog To WordPress</a> &#8211; which was a HUGE help. The gist of that was you need to download an export file from Blogger, then <a href="http://code.google.com/p/google-blog-converters-appengine/downloads/list">get this script</a> you run from the terminal (on Mac) which will convert the Blogger xml into a xml that WordPress will understand. (Just to give you an idea what we&#039;re talking about &#8211; the Blogger XML file I downloaded was over 40MB.)</p>
<p>THEN the fun began. After the conversion to WordPress XML &#8211; the file was still about 30MB. This meant that I had to run the import over a dozen times before it could chew through the whole file. When the import times out and you run it again, it recognizes that some posts are already there, so it doesn&#039;t import them a second time &#8211; but for some reason, it seemed to have trouble with a bunch of comments. <em>Some</em> of the comments DID get imported more than once. As well &#8211; the comment counts for each post weren&#039;t getting updated. SO! Here&#039;s the fix I pieced together for those issues.</p>
<p>First, to remove the duplicate comments &#8211; in PHPMyAdmin &#8211; I ran the following SQL command: (*DISCLAIMER: make sure you backup your database before attempting any of this!!)</p>
<p><code>CREATE TABLE temp_table AS SELECT * FROM wp_comments WHERE 1 GROUP BY `comment_post_ID`,`comment_content`,`comment_date`;</code></p>
<p>What that does is create a duplicate of the wp_comments table &#8211; but it&#039;s only grabbing the unique entries. If a comment is posted to the same post, has the same content and the same date &#8211; we&#039;ll just be grabbing one of those and ignoring the rest.</p>
<p><strong>UPDATED TO ADD:</strong> One important thing I need to add in here is that you need to set the primary keys and a few indexes for this new table &#8211; This is the structure of a normal wp_comments table:</p>
<p><code>CREATE TABLE `wp_comments` (<br />
  `comment_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,<br />
  `comment_post_ID` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  `comment_author` tinytext NOT NULL,<br />
  `comment_author_email` varchar(100) NOT NULL DEFAULT '',<br />
  `comment_author_url` varchar(200) NOT NULL DEFAULT '',<br />
  `comment_author_IP` varchar(100) NOT NULL DEFAULT '',<br />
  `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
  `comment_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
  `comment_content` text NOT NULL,<br />
  `comment_karma` int(11) NOT NULL DEFAULT '0',<br />
  `comment_approved` varchar(20) NOT NULL DEFAULT '1',<br />
  `comment_agent` varchar(255) NOT NULL DEFAULT '',<br />
  `comment_type` varchar(20) NOT NULL DEFAULT '',<br />
  `comment_parent` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  PRIMARY KEY (`comment_ID`),<br />
  KEY `comment_approved` (`comment_approved`),<br />
  KEY `comment_post_ID` (`comment_post_ID`),<br />
  KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`),<br />
  KEY `comment_date_gmt` (`comment_date_gmt`)<br />
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;</code></p>
<p>THEN, I ran this SQL command;</p>
<p><code>DROP TABLE wp_comments;<br />
RENAME TABLE temp_table TO wp_comments;</code></p>
<p>What that does is delete the wp_comments table, then we rename our new and improved &#034;temp_table&#034; so that it is now the official wp_comments table.</p>
<p>NEXT &#8211; we want to update the comment counts. To save having to recount the comments each time &#8211; there is a field in the wp_posts table that stores the total number of comments. However, with the way this import worked, those numbers did not get updated so most were saying there were 0 comments on posts that did have comments. To fix that issue I ran the following SQL command: (which I found <a href="http://planet.mysql.com/entry/?id=23970">here on Planet MySQL</a>)</p>
<p><code>UPDATE wp_posts wpp<br />
LEFT JOIN<br />
(SELECT comment_post_id AS c_post_id, count(*) AS cnt FROM wp_comments<br />
 WHERE comment_approved = 1 GROUP BY comment_post_id) wpc<br />
ON wpp.id=wpc.c_post_id<br />
SET wpp.comment_count=wpc.cnt<br />
WHERE wpp.post_type IN ('post', 'page')<br />
AND (wpp.comment_count!=wpc.cnt OR (wpp.comment_count != 0 AND wpc.cnt IS NULL));</code></p>
<p>Which as far as I can tell gets the comment counts for each post in wp_posts. (I can&#039;t tell you more than that because once you start getting into the &#034;LEFT JOIN&#034; stuff in sql, my brain shuts off)</p>
<p>The other piece advice I&#039;ll give is if you have a ginormous blog that you have to move like the one I was working with &#8211; set the blog up locally using <a href="http://www.mamp.info/en/index.html">MAMP</a>, do the imports, all the database correcting stuff &#8211; then just export the database and import it onto your server. The database file ended up only being 14MB uncompressed &#8211; way better than trying to chew through a 30MB import file. Once the database is up on your server, <a href="http://www.scriptygoddess.com/archives/2008/06/14/moving-a-wordpress-install/">a few more SQL commands (just like if you&#039;re moving your blog to a new domain)</a> to change the local version (probably http://localhost:8888 ) to your actual domain name, and you&#039;re done!</p>
<p><strong>Another tidbit to add:</strong> if you need to redirect blogger formatted url (that may include &#034;.html&#034; in the end) &#8211; add this to your htaccess file and it should redirect to the new (non extension ending) URL:</p>
<p><code>RewriteEngine On<br />
RewriteRule (.*)\.html $1 [R=301,L] </code></p>
<p>(I tooke off the first line and put the second line under the &#034;RewriteEngine On&#034; that WordPress has in it&#039;s htaccess block and it worked great)</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/05/21/the-blogger-to-wordpress-move-from-hell/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</title>
		<link>http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 18:10:21 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1622</guid>
		<description><![CDATA[Background: For a site I was working on, I was pulling in content from another page onto the homepage. However I wanted to just bring in an excerpt not the whole page. (And actually, a customized excerpt at that &#8211; not a default set character or word limit). I also didn&#039;t want any images brought [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Background: For a site I was working on, I was pulling in content from another page onto the homepage. However I wanted to just bring in an excerpt not the whole page. (And actually, a customized excerpt at that &#8211; not a default set character or word limit). I also didn&#039;t want any images brought in &#8211; I just wanted the text and any associated formatting.</p>
<p>Well, one problem here is that WordPress pages (at least as of this writing &#8211; with WordPress in version 2.8.5) do not have excerpts for pages. Only for posts. The way around this is to use the &lt;!&#45;&#45; more &#45;&#45;&gt; tag where you want your break. So that works fine &#8211; but what about stripping out the images? I&#039;m still working on my reg-ex knowledge, but I found this one from <a href="http://www.webmasterworld.com/forum88/6851.htm">here</a> and it worked for me. So this is what I&#039;m doing when I&#039;m pulling in my page excerpt:</p>
<p><code>&lt;?php<br />
$posts = query_posts('page_id=1234');<br />
if (have_posts()) : while (have_posts()) : the_post();<br />
//this makes the more work...<br />
global $more; $more = 0;<br />
?&gt;<br />
&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;<br />
&lt;?php<br />
$content = get_the_content('');<br />
$content = preg_replace('/&lt;img[^&gt;]+&gt;/is', '', $content);<br />
echo $content;<br />
?&gt;<br />
&lt;p&gt;&lt;a href="&lt;?php the_permalink(1234); ?&gt;"&gt;&lt;img src="/images/more.gif" /&gt;&lt;/a&gt;&lt;/p&gt;<br />
&lt;?php endwhile; endif; ?&gt;</code></p>
<p>*we&#039;re assuming &#034;1234&#034; is the ID of my page in the example above&#8230;</p>
<p>You&#039;ll also notice I manually added my &#034;more&#034; button image&#8230;</p>
<p>To read more about the more tag (and see where I got that global $more; $more = 0; from, you can see the <a href="http://codex.wordpress.org/Customizing_the_Read_More">WordPress codex here on the subject</a>. (Scroll to the very bottom of the page &#8211; to the section title &#034;How to use Read More in Pages&#034;)</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

