<?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>Mon, 15 Mar 2010 06:26:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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 [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>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>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>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>
		<item>
		<title>Adding a block of HTML to a WordPress post</title>
		<link>http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 03:10:10 +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=1617</guid>
		<description><![CDATA[One problem with the WYSIWYG editor in WordPress is that if you are trying to manually add in a block of HTML, the editor may try to translate that block into paragraph format, inserting &#60;p&#62; tags where you didn&#039;t intend, possibly (and most likely) ruining what you were intending to do with your HTML code [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/29/simple-shortcode-for-line-breaks/' rel='bookmark' title='Permanent Link: Simple Shortcode for Line Breaks'>Simple Shortcode for Line Breaks</a> <small>One kind of funny thing with WordPress is that entering...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/28/playing-with-post-attachments/' rel='bookmark' title='Permanent Link: Playing with Post Attachments'>Playing with Post Attachments</a> <small>I&#039;ve been doing a ton of sites recently using WordPress...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One problem with the WYSIWYG editor in WordPress is that if you are trying to manually add in a block of HTML, the editor may try to translate that block into paragraph format, inserting &lt;p&gt; tags where you didn&#039;t intend, possibly (and most likely) ruining what you were intending to do with your HTML code block.</p>
<p>Previously, my way around this had included the use of various plugins that had you wrap certain areas in your post with specific comments that would tell WordPress to leave that block alone and not insert those paragraph tags. There was still some issues doing it this way &#8211; as it required you to view these posts in the HTML view. Viewing them in the visual editor would mess everything up.</p>
<p>So, keeping in line with what seems to be a current trend at the moment of solving all my problems with shortcodes, that&#039;s how I&#039;ve decided to solve this problem as of late.</p>
<p>First &#8211; (you&#039;ll only need to do this once) &#8211; add the PHP code so that you can do the shortcode. If you don&#039;t already have a functions.php file in your theme directory, create one and add the following code:</p>
<p><code>function scriptysAddHTML_func($atts) {<br />
global $post;<br />
$id = $atts['id'];<br />
if (empty($id)) return;<br />
return get_post_meta($post->ID, $id, true);<br />
}<br />
add_shortcode('html', 'scriptysAddHTML_func');</code></p>
<p>Then, in your post when you want to add some custom HTML, paste your block of HTML into the <strong>value</strong> of a new custom field. For the <strong>name</strong> of this custom field, give it a unique name with no spaces. (For example: My_HTML_Block)</p>
<p>In your WordPress post, where you want this block to appear, add the shortcode like this:</p>
<p><code>&#91;html id=My_HTML_Block]</code></p>
<p>You would add it exactly like the above, except instead of My_HTML_Block, you would change that to be the name you gave your custom field.</p>
<p><strong>Extra Tip</strong> If for some reason, you&#039;re using more than one shortcode in your post and it doesn&#039;t seem like they&#039;re working&#8230; if you&#039;re using them one right after the other, make sure there is a space between them. ie. If you&#039;re using my <a href="http://www.scriptygoddess.com/archives/2009/08/29/simple-shortcode-for-line-breaks/">linebreak shortcode</a>, and you were adding more than one linebreak&#8230; it might not work if you do this:</p>
<p><code>[br][br][br]</code></p>
<p>You my have to do this:</p>
<p><code>[br] [br] [br]</code></p>
<p>Little minor thing, but something you might not have thought of&#8230; figured I&#039;d mention it. <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/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/29/simple-shortcode-for-line-breaks/' rel='bookmark' title='Permanent Link: Simple Shortcode for Line Breaks'>Simple Shortcode for Line Breaks</a> <small>One kind of funny thing with WordPress is that entering...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/28/playing-with-post-attachments/' rel='bookmark' title='Permanent Link: Playing with Post Attachments'>Playing with Post Attachments</a> <small>I&#039;ve been doing a ton of sites recently using WordPress...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Search from WordPress Admin (Post Listing) Redirecting to Home Page</title>
		<link>http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 14:14:52 +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=1616</guid>
		<description><![CDATA[This is possibly the most bizarre thing I&#039;ve ever seen. (This is relevant to version 2.8.4). If you have your WordPress install set up to be http://www.yourdomain.com but your blog install set up to be http://yourdomain.com (note the missing &#034;www&#034;) and you try to search for posts from with the WordPress admin, you get redirected [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/' rel='bookmark' title='Permanent Link: open_basedir restriction in effect error on WordPress page'>open_basedir restriction in effect error on WordPress page</a> <small>This is the second time I&#039;ve run into this problem....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This is possibly the most bizarre thing I&#039;ve ever seen. (This is relevant to version 2.8.4). If you have your WordPress install set up to be <strong>http://www.yourdomain.com</strong> but your blog install set up to be <strong>http://yourdomain.com</strong> (note the missing &#034;www&#034;) and you try to search for posts from with the WordPress admin, you get redirected to your blog&#039;s (front end) homepage. If you change your WordPress install to match your blog install (ie. remove the WWW &#8211; then it works fine) Sounds like a bug to me. I&#039;ll submit it to the WP team and see what they say &#8211; but in the meantime should you be up past 1am trying to figure that little gem out, hopefully I&#039;ve saved you some trouble and you can get to sleep earlier than I did. LOL!</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/' rel='bookmark' title='Permanent Link: open_basedir restriction in effect error on WordPress page'>open_basedir restriction in effect error on WordPress page</a> <small>This is the second time I&#039;ve run into this problem....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wordpress 2.8 Issues</title>
		<link>http://www.scriptygoddess.com/archives/2009/06/17/wordpress-2-8-issues/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/06/17/wordpress-2-8-issues/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 17:20:12 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2009/06/17/wordpress-2-8-issues/</guid>
		<description><![CDATA[In case you hadn&#039;t heard (and if you&#039;re using wordpress, how could you NOT have heard)   Wordpress 2.8 is out. One of the features included in this round was a rework of the way Widgets work &#8211; including a easier to use API. In light of this, I made use of the new [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/' rel='bookmark' title='Permanent Link: open_basedir restriction in effect error on WordPress page'>open_basedir restriction in effect error on WordPress page</a> <small>This is the second time I&#039;ve run into this problem....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>In case you hadn&#039;t heard (and if you&#039;re using wordpress, how could you NOT have heard) <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Wordpress 2.8 is out. One of the features included in this round was a rework of the way Widgets work &#8211; including a easier to use API. In light of this, I made use of the new API (<a href="http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28">armed with this great tutorial and sample file</a>) and created some custom widgets for my clients.</p>
<p>A few problems:<br />
I needed to use TinyMCE for one of the textareas, (<a href="http://matty.co.za/2009/06/integrate-tinymce-into-a-wordpress-widget/">There&#039;s some good information here on how to do that</a>) because the client doesn&#039;t know and doesn&#039;t want to know HTML. Trying to apply TinyMCE to the textarea in a widget presented all kind of problems.</p>
<p>Also &#8211; just simply dragging and dropping the widgets onto the correct sidebar was excruciating slow.</p>
<p>The solution to both of these problems was solved in the <a href="http://wordpress.org/support/topic/279132">2.8 FAQ</a> &#8211; specifically &#8211; turning on &#034;Accessibility Mode&#034; in the screen options for the widgets page. It&#039;s not as snazzy as it was before &#8211; but being excruciatingly slow and TinyMCE not working isn&#039;t snazzy either. So I&#039;ll take &#034;functional&#034; over &#034;Snazzy but not functional&#034;.</p>
<p>Anyway &#8211; just putting this out there for anyone else running into similar problems.</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/' rel='bookmark' title='Permanent Link: open_basedir restriction in effect error on WordPress page'>open_basedir restriction in effect error on WordPress page</a> <small>This is the second time I&#039;ve run into this problem....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/06/17/wordpress-2-8-issues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>open_basedir restriction in effect error on WordPress page</title>
		<link>http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 21:40:39 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1609</guid>
		<description><![CDATA[This is the second time I&#039;ve run into this problem. I opted not to post about it the first time, because the solution was so simple it was kind of silly. But lo-and-behold &#8211; I hit it again and forgot what the solution was anyway.  
I know there can be more than one thing [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/06/17/wordpress-2-8-issues/' rel='bookmark' title='Permanent Link: Wordpress 2.8 Issues'>Wordpress 2.8 Issues</a> <small>In case you hadn&#039;t heard (and if you&#039;re using wordpress,...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This is the second time I&#039;ve run into this problem. I opted not to post about it the first time, because the solution was so simple it was kind of silly. But lo-and-behold &#8211; I hit it again and forgot what the solution was anyway. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I know there can be more than one thing that causes that &#034;open_basedir restriction in effect&#034; error &#8211; but in my case it was because:</p>
<p>1) I was moving a wordpress site to another location (usually a subdomain of a live site so I could set it up as a &#034;test area&#034;)<br />
2) In the settings page, I had specified a different path for uploads (this is done on the &#034;miscellaneous&#034; settings page). This directory was actually OUTSIDE of the wordpress directory, which means I had to use the full server path to point to my custom uploads directory&#8230;</p>
<p>So I copied over the files to the test area, copied the database to the test database, changed the domain to the test domain using <a href="http://www.scriptygoddess.com/archives/2008/06/14/moving-a-wordpress-install/">this method</a>. But if you&#039;ve specified a path for uploads on that miscellaneous page &#8211; you&#039;ll need to log in once everything is all set up and change the path there too to the new one pointed at the new location.</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/06/17/wordpress-2-8-issues/' rel='bookmark' title='Permanent Link: Wordpress 2.8 Issues'>Wordpress 2.8 Issues</a> <small>In case you hadn&#039;t heard (and if you&#039;re using wordpress,...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IMPORTANT &#8211; WARNING &#8211; BEFORE YOU UPGRADE WORDPRESS</title>
		<link>http://www.scriptygoddess.com/archives/2009/02/12/important-warning-before-you-upgrade-wordpress/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/02/12/important-warning-before-you-upgrade-wordpress/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 20:23:02 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1599</guid>
		<description><![CDATA[If you are using the default theme and have made modifications to it without renaming it - you may be in for a surprise when you upgrade using the new easy auto-upgrade button. Your theme will be replaced with the original one that WordPress came with. For all I know there&#039;s probably already a document/installation [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/29/simple-shortcode-for-line-breaks/' rel='bookmark' title='Permanent Link: Simple Shortcode for Line Breaks'>Simple Shortcode for Line Breaks</a> <small>One kind of funny thing with WordPress is that entering...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><strong>If you are using the default theme and have made modifications to it without renaming it </strong>- you may be in for a surprise when you upgrade using the new easy auto-upgrade button. Your theme will be replaced with the original one that WordPress came with. For all I know there&#039;s probably already a document/installation instruction that warns you of this fact somewhere. (I would hope anyway)</p>
<p>I know this may or may not apply to many people &#8211; but having just lost a bunch of changes on a site I was working on (had been tweaking the default theme to test out some stuff) I didn&#039;t realize that 1-click upgrade feature would do that.</p>
<p>Other than that &#8211; the new upgrade thing is awesome. Easily upgraded a bunch of other sites (that thankfully used custom named themes!) without issue and because it just a one-click upgrade &#8211; I did it much sooner than I would have if I had to download and manually upload everything.</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/29/simple-shortcode-for-line-breaks/' rel='bookmark' title='Permanent Link: Simple Shortcode for Line Breaks'>Simple Shortcode for Line Breaks</a> <small>One kind of funny thing with WordPress is that entering...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/02/12/important-warning-before-you-upgrade-wordpress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Wordpress: Make home page show latest post (in the &quot;single post&quot; format)</title>
		<link>http://www.scriptygoddess.com/archives/2007/04/28/wordpress-make-home-page-show-latest-post-in-the-single-post-format/</link>
		<comments>http://www.scriptygoddess.com/archives/2007/04/28/wordpress-make-home-page-show-latest-post-in-the-single-post-format/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 07:05:09 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Bookmarks]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/04/28/wordpress-make-home-page-show-latest-post-in-the-single-post-format/</guid>
		<description><![CDATA[In a custom wordpress theme design I was working on tonight, I was trying to do as the title describes &#8211; make the home page show only one post (yes I know there&#039;s already a built in way to do this) but I wanted it to show up the same way the single view shows [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>In a custom wordpress theme design I was working on tonight, I was trying to do as the title describes &#8211; make the home page show only one post (yes I know there&#039;s already a built in way to do this) but I wanted it to show up the same way the single view shows it &#8211; with the comments expanded and the comments form visible, etc. If you know of another/better way to do this, please say so in the comments. But this DID do the trick. I found <a href="http://wordpress.org/support/topic/110676">this page</a> in the support archives. The idea was to create your index.php to look like you wanted (ie. exactly like the &#034;single.php&#034; page) but add this before you start the loop:</p>
<p><code>&lt;?php<br />
      $i=0; // Initialize to Zero;<br />
      if (have_posts()) :<br />
        while (have_posts()) : the_post();<br />
            if ($i==0) {$recentpostid = $post-&gt;ID; $i=$i+1;}<br />
        endwhile;<br />
      endif;<br />
      //get only the latest post<br />
      $posts = query_posts( 'p='.$recentpostid."'");<br />
?&gt;</code></p>
<p>and then you start your loop like you normally would&#8230;</p>
<p><code>&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;</code></p>
<p>Worked for me!</p>
<p><strong>Update</strong> As Danny pointed out in the comments &#8211; there&#039;s a simpler way to do this. Put the following code on the page (I put it before the loop and it worked)<br />
<code>&lt;?php $wp_query-&gt;is_single = true; ?&gt;</code><br />
Much simpler <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/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2007/04/28/wordpress-make-home-page-show-latest-post-in-the-single-post-format/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Overcoming the upgrade</title>
		<link>http://www.scriptygoddess.com/archives/2006/12/22/overcoming-the-upgrade/</link>
		<comments>http://www.scriptygoddess.com/archives/2006/12/22/overcoming-the-upgrade/#comments</comments>
		<pubDate>Sat, 23 Dec 2006 06:25:22 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2006/12/22/overcoming-the-upgrade/</guid>
		<description><![CDATA[I&#039;ll make notes of issues I ran into and the solutions as I go along, but so far I&#039;ve had two three issues come up when upgrading.
1) When I ran the upgrade, it sort of died before finishing&#8230; I refreshed and it told me it was all set. Checked on the main page, and everything [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/' rel='bookmark' title='Permanent Link: open_basedir restriction in effect error on WordPress page'>open_basedir restriction in effect error on WordPress page</a> <small>This is the second time I&#039;ve run into this problem....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#039;ll make notes of issues I ran into and the solutions as I go along, but so far I&#039;ve had <strike>two</strike> three issues come up when upgrading.</p>
<p>1) When I ran the upgrade, it sort of died before finishing&#8230; I refreshed and it told me it was all set. Checked on the main page, and everything seemed to be okay &#8211; but when I logged in to start tinkering around with the settings, I couldn&#039;t log in completely. I got the dashboard with no navigation and then I clicked on something and all it wanted to do was send me to the profile page &#8211; but with nothing showing except &#034;You do not have sufficient permissions to access this page&#034;. Googled for a solution and <a href="http://markjaquith.wordpress.com/2006/03/28/wordpress-error-you-do-not-have-sufficient-permissions-to-access-this-page/">found one on Mark&#039;s site</a>. Ran his script, and all was well again.</p>
<p>2) Then I discovered that clicking on the the &#034;previous entries&#034; link at the bottom sent me to a &#034;page can not be found&#034; error page. Google to the rescue &#8211; and <a href="http://codex.wordpress.org/Using_Permalinks">found one on the Wordpress Codex</a>&#8230; (scroll ALLLL the way down to &#034;Paged Navigation doesn&#039;t work&#034; &#8211; There it will tell you that the error I was getting was due to the .htaccess file that WordPress generates. Delete the contents (or at least the wordpress stuff in there) and manually add the code back in from the Options -> Permalinks page. Again, all was well again.</p>
<p>3) This one was really weird. I had a post that was showing up in Firefox but not IE. It was like it didn&#039;t exist at all on IE. Wasn&#039;t in the source. Try to pull up the post page, and it gives you a 404 error not found. Turns out &#8211; and maybe this was because of the glitch during the upgrade &#8211; the post didn&#039;t have any status indicated. It wasn&#039;t marked as &#034;Published&#034;, &#034;Draft&#034;, or &#034;Private&#034;. (The weird thing is that, then WHY did Firefox show it at all?!?) Anyway, clicking the &#034;Published&#034; box and re-saving the post seemed to fix the problem.</p>
<p>If you find any other broken links or errors, etc. &#8211; please let me know!</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/06/10/open_basedir-restriction-in-effect-error-on-wordpress-page/' rel='bookmark' title='Permanent Link: open_basedir restriction in effect error on WordPress page'>open_basedir restriction in effect error on WordPress page</a> <small>This is the second time I&#039;ve run into this problem....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2006/12/22/overcoming-the-upgrade/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Above The Fold</title>
		<link>http://www.scriptygoddess.com/archives/2005/01/12/above-the-fold/</link>
		<comments>http://www.scriptygoddess.com/archives/2005/01/12/above-the-fold/#comments</comments>
		<pubDate>Wed, 12 Jan 2005 04:24:56 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2005/01/12/above-the-fold/</guid>
		<description><![CDATA[I&#039;ve been a little absent around here lately, and part of the reason is that I&#039;ve been working on a project that I can now formally announce here! I&#039;m starting up a little side business. You see, I&#039;ve always loved doing origami &#8211; from the time that I was a kid. I can&#039;t even remember [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/28/playing-with-post-attachments/' rel='bookmark' title='Permanent Link: Playing with Post Attachments'>Playing with Post Attachments</a> <small>I&#039;ve been doing a ton of sites recently using WordPress...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#039;ve been a little absent around here lately, and part of the reason is that I&#039;ve been working on a project that I can now formally announce here! I&#039;m starting up a little side business. You see, I&#039;ve always loved doing <a href="http://en.wikipedia.org/wiki/Origami">origami</a> &#8211; from the time that I was a kid. I can&#039;t even remember when I started. And now I&#039;ve decided to turn some of my creations into things I can share. Ok&#8230; sell. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  My little side business is called <a href="http://www.abovethefold.org">Above The Fold</a> (<a href="http://www.abovethefold.org">AboveTheFold.org</a>) and it&#039;s an online store for (at the moment) origami earrings, cards, and magnets. (More things will be coming).</p>
<p>(As for the .org &#8211; instead of the .com &#8211; the <strike>squatter</strike> &#034;owner&#034; of the <strong>.com</strong> is willing to sell it&#8230; for a mere $7K! heh. I&#039;ll be lucky if I sell 5 pairs of earrings this whole year!! LOL! I don&#039;t think it&#039;s in my budget!)</p>
<p>This may not seem very &#034;scripty&#034; related &#8211; but actually it is. When working on my ecommerce site, I briefly looked into some pre-made web-shops, but they were all a little &#034;too big&#034; for what I wanted to do. I wanted to add products easily. I wanted to have &#034;add to cart&#034; buttons automatically generated.. etc. etc. I thought I&#039;d just start writing something on my own &#8211; but then realized that I could probably do A LOT of what I wanted with WordPress!! Not sure how many ecommerce sites are WordPress driven &#8211; but I did it quite easily. Now that it&#039;s up and running, I can see more &#034;ecommerce&#034; type &#034;plugins&#034; I can add &#8211; but for now, I&#039;m busy making origami.</p>
<p>But I thought, for those interested, I might share some of my little tricks that make the site run. Many of them are take-offs on what I did for <a href="http://bigpinkcookie.com">Christine</a> with <a href="http://pixelog.org">Pixelog</a>.<br />
<span id="more-1415"></span><br />
First thing &#8211; I&#039;m using WP 1.5 (formerly known as 1.3) for the site. Up until now, I hadn&#039;t had too much opportunity to play around with it &#8211; but I gotta tell you. This version KICKS BUTT!!! I&#039;ve really been enjoying working with it and can&#039;t wait to upgrade my other blogs!</p>
<p>So, now on to the geeky-under-the-hood talk&#8230;</p>
<p><strong>Product Setup.</strong><br />
Each product is essentially a post. The &#034;Product Name&#034; is the &#034;Post title&#034;. In the &#034;excerpt&#034; field, I put the thumbnail image of the product. In the main post field I first put the full size photo of the product, then the &#034;more&#034; tag &#8211; then I put the product&#039;s description.</p>
<p>I store the price in a custom field. As well some products may come in gold or silver, so I have another custom field to indicate if it&#039;s one of those (and which one). I have another custom field that stores available sizes.</p>
<p><strong>Home Page.</strong><br />
I wanted to show the most recent products that I had added to the store. (Just the thumbnails). To list just the excerpts (there may be another way &#8211; if so, please tell me!) I access the raw data from the database. Right BEFORE the WP Loop start I initialize my count variable:<br />
<code>&lt;?php<br />
$count = 0;<br />
?&gt;</code></p>
<p>After the loop start, here&#039;s what I have:<br />
<code>&lt;?php<br />
//each time we loop through - get JUST the post excerpt<br />
$postdata = $wpdb-&gt;get_row("SELECT post_excerpt FROM wp_posts WHERE id = $id");<br />
$count++;<br />
if ($count == 1) {<br />
echo '&lt;ul class="itemlisting"&gt;';<br />
}<br />
?&gt;<br />
&lt;li&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php echo $postdata-&gt;post_excerpt; ?&gt;&lt;/a&gt;&lt;span class="title"&gt;&lt;?php the_title(); ?&gt;&lt;/span&gt;&lt;?php edit_post_link(__('Edit This')); ?&gt;<br />
&lt;/li&gt;<br />
&lt;?php<br />
if ($count == 4) {<br />
echo "&lt;/ul&gt;";<br />
$count = 0;<br />
}<br />
?&gt;<br />
&lt;?php endwhile; ?&gt;<br />
&lt;?php<br />
if ($count &lt; 4 &#038;&#038; $count &gt; 0) {<br />
echo "&lt;/ul&gt;";<br />
$count = 0;<br />
}<br />
?&gt;</code><br />
(I&#039;m creating two lists of products &#8211; you may ask why I&#039;m not making just one list. I did have it that way at one point &#8211; but had some cross browser compatibility issues. This method meant less code than some other options I was working with.)</p>
<p><strong>Categories.</strong><br />
I have my &#034;category&#034; (product type) pages set up very similarly as the home page.</p>
<p><strong>Post Pages.</strong><br />
This is where the fun gets started. My shopping cart is handled through paypal. WordPress itself is generating the product ID numbers. The product names are derived from the &#034;post titles&#034;. Prices are grabbed from the custom field. I also display some customized text depending on that &#034;gold silver&#034; option.</p>
<p>So first, I want to extract the full size image &#8211; but not the product description.<br />
<code>$content = explode('&lt;!--more--&gt;', $pages[0]);</code><br />
That breaks up the content into the two pieces. So to echo the first part (the part with just the full size product image) I do this:<br />
<code>echo $content[0];</code><br />
To display the rest of the product description (formatted as you&#039;d expect with paragraph and &#034;br&#034; tags) I do this:<br />
<code>echo apply_filters('the_content', $content[1]);</code><br />
To get the custom field values:<br />
<code>$price = get_post_custom_values('price');<br />
$sizes = get_post_custom_values('size');<br />
$goldsilver = get_post_custom_values('goldsilveroption');</code><br />
To echo the sizes in a drop down menu:<br />
<code>Size: &lt;select name="os0"&gt;<br />
&lt;?php<br />
$sizes = get_post_custom_values('size');<br />
foreach ($sizes as $size) {<br />
echo '&lt;option value="'.$size.'"&gt;'.$size.'&lt;/option&gt;';<br />
}<br />
?&gt;<br />
&lt;/select&gt;</code><br />
To echo the price, simply:<br />
<code>&lt;?php echo $price[0]; ?&gt;</code><br />
I display the appropriate text for the gold or silver by doing this:<br />
<code>&lt;?php if ($goldsilver &#038;&#038; $goldsilver[0] == "gold") { ?&gt;<br />
Earrings are made with 14k gold filled posts and earwire.<br />
&lt;?php } else if ($goldsilver &#038;&#038; $goldsilver[0] == "silver") { ?&gt;<br />
Earrings are made with sterling silver posts and earwire.<br />
&lt;?php } ?&gt;<br />
</code><br />
So that&#039;s it. I&#039;m not completely done (is anyone EVER done tweaking their site??) I still want to add a few additional features. But at the moment, the site does everything and more that I wanted for a first release.</p>
<p>Sooo&#8230;.Wanna buy some origami earrings? <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/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/08/28/playing-with-post-attachments/' rel='bookmark' title='Permanent Link: Playing with Post Attachments'>Playing with Post Attachments</a> <small>I&#039;ve been doing a ton of sites recently using WordPress...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2005/01/12/above-the-fold/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>WP security bug</title>
		<link>http://www.scriptygoddess.com/archives/2004/12/07/wp-security-bug/</link>
		<comments>http://www.scriptygoddess.com/archives/2004/12/07/wp-security-bug/#comments</comments>
		<pubDate>Wed, 08 Dec 2004 03:40:11 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/12/07/wp-security-bug/</guid>
		<description><![CDATA[There&#039;s a pretty serious security bug with WP 1.2.1 (and the current 1.3 alpha), one that can make it so your blog is basically unusable (not permanently, as far as I can tell) but still &#8211; if you&#039;re using WordPress you should probably make this change.
In any case, here is how you fix the problem. [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>There&#039;s a pretty serious security bug with WP 1.2.1 (and the current 1.3 alpha), one that can make it so your blog is basically unusable (not permanently, as far as I can tell) but still &#8211; if you&#039;re using WordPress you should probably make this change.</p>
<p>In any case, <a href="http://weblog.burningbird.net/archives/2004/12/03/kitchen-was-hacked/">here is how you fix the problem.</a> It&#039;s a very easy fix. If you can search for text on a page, you can fix this problem.</p>
<p>I hesitated posting this, because I don&#039;t want to &#034;start a panic&#034; &#8211; nor do I want to give instructions on how to hack WP blogs. But I do think it&#039;s important that people go ahead and make this change.</p>
<p>[brought to my attention by <a href="http://bigpinkcookie.com/">Christine</a>]</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2004/12/07/wp-security-bug/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.846 seconds -->
