<?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>quirm.net &#187; tips</title>
	<atom:link href="http://quirm.net/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://quirm.net</link>
	<description>wordpress &#38; web design</description>
	<lastBuildDate>Fri, 04 May 2012 23:47:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Page Of Posts</title>
		<link>http://quirm.net/2012/01/12/page-of-posts/</link>
		<comments>http://quirm.net/2012/01/12/page-of-posts/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 13:21:53 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Themes]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3332</guid>
		<description><![CDATA[Our downloadable <a href=-"http://quirm.net/download/80/">Twenty Eleven Child theme</a> has now been updated to include a simple Page of Posts custom page template.]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2012/01/blue-page.png" alt="" width="150" height="150" class="alignleft size-full wp-image-3341" /> Our downloadable <a href=-"http://quirm.net/download/80/">Twenty Eleven Child theme</a> has now been updated to include a simple Page of Posts custom page template. </p>
<p>Whilst it is designed to work within a child of Twenty Eleven, it should be possible to adapt the template to suit other themes. If you are using another theme, remember that you will need to replicate the html structure of your own theme within the template.</p>
<p>You can then save your new template as <span class="italics">pageofposts.php</span>, upload it to your theme and then assign the Page of Posts template to your new Page via the Page Template Dropdown.</p>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2012/01/12/page-of-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Store Posts in the Trash</title>
		<link>http://quirm.net/2011/12/09/dont-store-posts-in-the-trash/</link>
		<comments>http://quirm.net/2011/12/09/dont-store-posts-in-the-trash/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 22:17:25 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3311</guid>
		<description><![CDATA[Yes, you did read that title correctly. And I did a double-take too when I saw this posted in the wordpress.org support forums. I thought that this kind of thing was an urban myth. But &#8212; hand on heart &#8212; someone really did decide to store more than a dozen, previously published, posts in their&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2011/12/no-trash.png" alt="" width="150" height="150" class="alignleft size-full wp-image-3315" /> Yes, you did read that title correctly. </p>
<p>And I did a double-take too when I saw this posted in the wordpress.org support forums. I thought that this kind of thing was an urban myth. But &#8212; hand on heart &#8212; someone really <em>did</em> decide to store more than a dozen, previously published, posts in their WordPress Trash until they got around to polishing them up for re-publication.</p>
<p>When they finally logged back in again (weeks later), lo and behold, all of their precious posts had been permanently deleted with absolutely no chance of getting them back (short of restoring the whole site via a recent database backup). </p>
<p>Yes, folks, WordPress does empty your Trash for you every 30 days by default. That said, Trash is no place to store <strong>anything</strong> (unless you are one of these strange Windows users who also stores documents in their Recycle Bin in which case&#8230; you&#8217;re on your own). </p>
<p>If you want to pull posts off your site for further work or review, simply change their status from <span class="italics">Published</span> to <span class="italics">Draft</span> or <span class="italics">Pending Review</span> via the Quick Edit link or by Edit Post (or Edit Page).</p>
<p>Keep Trash for stuff that you really, <strong>really</strong>, don&#8217;t want any more.</p>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/12/09/dont-store-posts-in-the-trash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Your Own Read More Link</title>
		<link>http://quirm.net/2011/12/07/adding-your-own-read-more-link/</link>
		<comments>http://quirm.net/2011/12/07/adding-your-own-read-more-link/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 01:11:10 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3257</guid>
		<description><![CDATA[Continuing with the topic of custom read more links, there are times when you may want to use &#60;?php the_content();?&#62; in your theme&#8217;s template file in conjunction with the &#60;!--more--&#62; tag in your posts to create custom post teasers. But you want the &#8220;read more&#8221; link to appear somewhere other than immediately after the teaser.&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2011/12/more2.png" alt="" width="150" height="150" class="alignleft size-full wp-image-3259" /> Continuing with the topic of <a href="http://quirm.net/2011/12/02/replace-with-a-post-link/" title="Replace [...] with a Post Link">custom read more links</a>, there are times when you may want to use <code>&lt;?php the_content();?&gt;</code> in your theme&#8217;s template file in conjunction with the <code>&lt;!--more--&gt;</code> tag in your posts to create custom post teasers. But you want the &#8220;read more&#8221; link to appear somewhere other than immediately after the teaser.</p>
<p style="clear:left;">Just edit the relevant theme template file and replace:</p>
<pre><code>&lt;?php the_content();?&gt;</code></pre>
<p>with:</p>
<pre><code>&lt;?php the_content('', false,'');?&gt;</code></pre>
<p>This will supress even the default &#8220;read more&#8221; link.</p>
<p>Next, move to the point in your template file where you want your custom &#8220;read more &#8221; link to be displayed and add:</p>
<pre><code>&lt;a class="more-link" href="&lt;?php the_permalink();?&gt;#more-&lt;?php echo $post-&gt;ID;?&gt;"&gt;&lt;?php _e('Continue reading );the_title();?&gt;&lt;/a&gt;</code></pre>
<p>Simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/12/07/adding-your-own-read-more-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace [...] with a Post Link</title>
		<link>http://quirm.net/2011/12/02/replace-with-a-post-link/</link>
		<comments>http://quirm.net/2011/12/02/replace-with-a-post-link/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 16:48:47 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3244</guid>
		<description><![CDATA[Excerpts (teasers) can be shown on WordPress through two methods: Using &#60;?php the_content();?&#62; in your theme template file(s) and then inserting the &#60;!-- more--&#62; into your post at your desired cut-off point. Using &#60;?php the_excerpt();?&#038;gt; in your theme template file(s) and allowing WordPress to generate a teaser from the first 55 words of the post&#8217;s&#8230;]]></description>
			<content:encoded><![CDATA[<p>Excerpts (teasers) can be shown on WordPress through two methods:</p>
<p><img src="http://quirm.net/wp-content/uploads/2011/12/more-150x150.png" alt="" width="150" height="150" class="alignleft size-thumbnail wp-image-3252" />
<ol>
<li>Using <code>&lt;?php the_content();?&gt;</code> in your theme template file(s)  and then inserting the <code>&lt;!-- more--&gt;</code> into your post at your desired cut-off point.</li>
<li style="margin-top:15px;">Using <code>&lt;?php the_excerpt();?&#038;gt</code>; in your theme template file(s) and allowing WordPress to generate a teaser from the first 55 words of the post&#8217;s content &#8212; without the need to place a <code>&lt;!-- more--&gt;</code> tag in the post.</li>
</ol>
<p>Option 1 automatically creates a nice &#8220;read more&#8221; link at the bottom of each teaser that allows readers to go straight to the full, single, post but it does mean that you have to remember to enter that pesky <code>&lt;!-- more--&gt;</code> tag into your posts before you publish them.</p>
<p>Option 2 is fully automatic but lacks the nice &#8220;read more&#8221; link. So how can you have all of the benefits of the automatic excerpt but also provide a link to the the single post?</p>
<p>Simply edit your theme&#8217;s functions.php file and add the following function after the opening <code>&lt;?php</code> tag.</p>
<pre><code>function my_excerpt_link() {
	return ' &lt;a class="more-link" href="'. get_permalink() . '"&gt;' .  printf(__( 'Read $s'), get_the_title() ) . '&lt;/a&gt;';
}
add_filter( 'excerpt_more', 'my_excerpt_link' );</code></pre>
<p>The above code will generate an automatic link to the single post in the format:</p>
<p><a href="#">Read Replace [...] with a Post Link</a></p>
<p>Now you get the benefits of both options.</p>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/12/02/replace-with-a-post-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing Backgrounds with body class()</title>
		<link>http://quirm.net/2011/10/11/changing-backgrounds-with-body-class/</link>
		<comments>http://quirm.net/2011/10/11/changing-backgrounds-with-body-class/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 15:56:37 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3173</guid>
		<description><![CDATA[The body_class() WordPress function attaches a list of classes to the &#60;body&#62; element according to what type of page is being displayed. These classes can be used &#8212; in conjunction with your theme’s stylesheet &#8212; to display different backgrounds on different pages. Let’s assume your header.php template file contains: &#60;body &#60;?php body_class(); ?&#62;&#62; And your&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2011/10/crayons-150x150.png" alt="" title="crayons" width="150" height="150" class="alignleft size-thumbnail wp-image-3179" /> The <code>body_class()</code> WordPress function attaches a list of classes to the <code>&lt;body&gt;</code> element according to what type of page is being displayed.</p>
<p>These classes can be used &#8212; in conjunction with your theme’s stylesheet &#8212; to display different backgrounds on different pages. </p>
<p class="clearleft" >Let’s assume your header.php template file contains:</p>
<pre><code>&lt;body &lt;?php body_class(); ?&gt;&gt;</code></pre>
<p>And your current CSS for the background looks like:</p>
<pre><code>body {background:#fff url(images/bg.jpg);}</code></pre>
<p><span id="more-3173"></span></p>
<p>In a single post, your body tag would look like:</p>
<pre><code>&lt;body class="single single-post postid-188 single-format-standard logged-in admin-bar"&gt;</code></pre>
<p>A category page could have:</p>
<pre><code>&lt;body class="archive category category-cat-a category-9 logged-in admin-bar"&gt;</code></pre>
<p>whilst a tag page might generate:</p>
<pre><code>&lt;body class="archive tag tag-tag1 tag-92 logged-in admin-bar"&gt;</code></pre>
<h3>The CSS</h3>
<p>You can add some new rules to your theme&#8217;s CSS to target specific backgrounds at particular pages.</p>
<h4>Default Single Post</h4>
<pre><code>body.single {background:#ccc url(images/bg-single.jpg);}</code></pre>
<h4>Single Post with an ID of 188</h4>
<pre><code>body.postid-188 {background:#999 url(images/bg-special.jpg);}</code></pre>
<h4>Default Category Background</h4>
<pre><code>body.category {background:#eee url(images/bg-cat.jpg);}</code></pre>
<h4>Category A Only</h4>
<pre><code>body.category-cat-a {background:#ddd url(images/bg-cat-a.jpg);}</code></pre>
<p>The possibilities are almost endless. </p>
<p>You can find a full list of the classes generated by the <code>body_class()</code> function in the <a href="http://codex.wordpress.org/Function_Reference/body_class">WordPress Codex</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/10/11/changing-backgrounds-with-body-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Headers Already Sent</title>
		<link>http://quirm.net/2011/10/07/headers-already-sent/</link>
		<comments>http://quirm.net/2011/10/07/headers-already-sent/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 08:50:01 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3041</guid>
		<description><![CDATA[The most common reasons for seeing this error message in your WordPress site are spaces, new lines, or invisible characters before an opening &#60;?php tag or after a closing ?&#62; tag in one of the site&#8217;s scripts. But, in order to fix the problem, you have to know which file is causing the problem. Step&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2011/09/message.png" alt="" title="message" width="150" height="150" class="alignleft size-full wp-image-3054" /> The most common reasons for seeing this error message in your WordPress site are spaces, new lines, or invisible characters before an opening <code>&lt;?php</code> tag or after a closing <code>?&gt;</code> tag in one of the site&#8217;s scripts. But, in order to fix the problem, you have to know which file is causing the problem.</p>
<p><span id="more-3041"></span></p>
<h3>Step 1: Interpreting the Error Message </h3>
<p>All of the relevant information is normally given in the first part of the message &#8212; the <code>... output started at...</code> part.</p>
<h4>Example 1</h4>
<p><code>Warning: Cannot modify header information - headers already sent by (output started at /path/wp-content/plugins/foobar/foobar.php:8) in /path/wp-comments-post.php on line 55</code></p>
<p>In this example, the problem is in the foobar.php file of the Foobar plugin.</p>
<h4>Example 2</h4>
<p><code>Warning: Cannot modify header information - headers already sent by (output started at /path/wp-content/themes/wibble/functions.php:11) in /path/wp-includes/pluggable.php on line 850</code></p>
<p>Here, the problem is in functions.php file within the Wibble theme</p>
<h4>Example 3</h4>
<p><code>Warning: Cannot modify header information - headers already sent by (output started at /path/blog/wp-config.php:82) in /path/blog/wp-login.php on line 42</code></p>
<p>The problem is at line 82 of wp-config.php.</p>
<h3>Step 2: Fixing the Problem </h3>
<h4>Example 1: A Plugin</h4>
<p>The easiest option here is to simply delete the plugin and look for an alternative one. If you cannot access your WordPress dashboard, <a href="http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F">reset the plugins folder</a>. Then re-install your plugins &#8212; with the exception of the one that caused the problem.</p>
<h4>Example 2: The Theme</h4>
<p>If you are not comfortable with editing PHP files, then you may want to look at installing another theme. If you cannot access your WordPress dashboard, switch to the default theme by renaming your current theme&#8217;s folder in wp-content/themes and adding &#8220;-old&#8221; to the end of the folder name using <a href="http://codex.wordpress.org/FTP_Clients">FTP</a> or whatever file management application your host provides. This should allow you back into your dashboard where you can download another theme.</p>
<p>If you are comfortable with editing PHP files, then download the file mentioned in the error message (functions.php in the Example 2) and follow the instructions for <a href="http://quirm.net/?p=3041#invisible">removing invisible characters in a file</a>.</p>
<h4>Example 3: wp-config.php</h4>
<ol>
<li>Download wp-config.php from your site&#8217;s main WordPress folder.</li>
<li>Open the file in a <strong>plain text</strong> editor.</li>
<li>Check that the <strong>very first</strong> characters are <code>&lt;?php</code></li>
<li>If the very last characters are <code>?&gt;</code>, remove them.</li>
<li>Check that there are no invisible characters in the file.</li>
<li>Re-upload the amended file.</li>
</ol>
<h3 id="invisible">Removing Invisible Characters in a File</h3>
<ol>
<li>Open the file in a <strong>plain text</strong> editor.</li>
<li>Place the cursor before the first character in the file.</li>
<li>Press the BACKSPACE key &#038; keep it pressed for a count of 10.</li>
<li>Place the cursor after the last character in the file.</li>
<li>Now press the DELETE key on your computer &#038; keep it pressed for a count of 10.</li>
<li>Save the file without pressing any other key.</li>
<li>Check the encoding of the file. Do not encode files as UTF-8 with BOM. The BOM will be seen as a character.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/10/07/headers-already-sent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress SEO: Better Titles</title>
		<link>http://quirm.net/2011/10/03/wordpress-seo-better-titles/</link>
		<comments>http://quirm.net/2011/10/03/wordpress-seo-better-titles/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 08:02:39 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3081</guid>
		<description><![CDATA[The content of the HTML &#60;title&#62;&#60;/title&#62; tag is used to: Create a title in the browser toolbar Provide a title for the page when it is bookmarked Display a title for the page in search-engine results It make sense, therefore, to take some time to craft a good title in your WordPress site. In the&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2011/09/html.png" alt="" title="html" width="150" height="150" class="alignright size-full wp-image-3088" /> The content of the <abbr title="HyperText Markup Language">HTML</abbr> &lt;title&gt;&lt;/title&gt; tag is used to:</p>
<ul>
<li>Create a title in the browser toolbar</li>
<li>Provide a title for the page when it is bookmarked</li>
<li>Display a title for the page in search-engine results</li>
</ul>
<p>It make sense, therefore, to take some time to craft a good title in your WordPress site. In the vast majority of WordPress themes, the title is generated in the theme&#8217;s header.php template file. So you need to start by editing this file.</p>
<p><span id="more-3081"></span></p>
<p>Some themes simply use something like:</p>
<pre><code>&lt;title&gt;&lt;?php wp_title();?&gt;&lt;/title&gt;</code></pre>
<p>But that&#8217;s not nearly enough to generate a good title. What you want is code that generates informative, page-specific, titles. So try something like:</p>
<pre><code>&lt;title&gt;&lt;?php global $page, $paged;
if ( $paged &gt;= 2 || $page &gt;= 2 ) $we_are_on = sprintf( __( ' (Page %s) ' ), max( $paged, $page ) );
else $we_are_on = '';

if( is_home () ) : printf(__( '%1$s%2$s on %3$s'), wp_title('', false), $we_are_on, get_bloginfo('name') );

elseif( is_search() ) :
if( trim( get_search_query() ) == '' )  printf(__('No search query entered on %1$s'), get_bloginfo('name') );
else printf( __( 'Search Results for \'%1$s\' on %2$s%3$s' ), trim(get_search_query() ), get_bloginfo('name'), $we_are_on );

elseif ( is_category() || is_author() ) : printf(__( '%1$s%2$s on %3$s' ), wp_title('', false), $we_are_on, get_bloginfo('name') );

elseif( is_tag() ) : printf( __('Entries tagged with \'%1$s\'%2$s on %3$s') , wp_title('', false), $we_are_on, get_bloginfo('name') );

elseif( is_archive() ) :
printf( __('Archives for %1$s%2$s on %3$s'), wp_title('', false), $we_are_on, get_bloginfo('name') );

elseif( is_404() ) : printf(__( 'Page not found on %1$s' ), get_bloginfo('name')  );

else : printf( __('%1$s%2$s'), wp_title(':',true, 'right'), get_bloginfo('name') );

endif;
?&gt;
&lt;/title&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/10/03/wordpress-seo-better-titles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Memory Issues</title>
		<link>http://quirm.net/2011/09/27/wordpress-memory-issues/</link>
		<comments>http://quirm.net/2011/09/27/wordpress-memory-issues/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 13:45:13 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3027</guid>
		<description><![CDATA[Symptom: Your site crashes and displays a message along the lines of Fatal error: Allowed memory size of xxxxxxxx bytes exhausted Cause: You do not have sufficient memory allocated to PHP within your hosting account. There are a number of ways you can get your site up &#038; running again. The method that works for&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2009/09/idea-142x150.png" alt="" title="Troubleshoot" width="142" height="150" class="alignleft size-thumbnail wp-image-1333" /> <strong>Symptom</strong>: Your site crashes and displays a message along the lines of <code>Fatal error: Allowed memory size of xxxxxxxx bytes exhausted</code></p>
<p><strong>Cause:</strong> You do not have sufficient memory allocated to PHP within your hosting account.</p>
<p>There are a number of ways you can get your site up &#038; running again. The method that works for you will depend upon your host&#8217;s server set up.</p>
<p><span id="more-3027"></span></p>
<h3>Via a php.ini file</h3>
<p>Some hosts allow you to amend some PHP variables on your hosting account via a <a href="http://php.net/manual/en/ini.core.php">php.ini</a> file. If necessary, check with your hosts to see is this option is available to you.</p>
<p>If you already have a php.ini file, download it and open in in a <strong>plain text</strong> editor. Look for <code>memory_limit</code>. If the value is 32M try, 64M. If it&#8217;s already 64M, try 128M:</p>
<p><code>memory_limit = 128M;</code></p>
<p>Then upload the amended file.</p>
<p>If you do not have an php.ini file, check with your host regarding first about creating it.</p>
<h3>Via an .htaccess file</h3>
<p>If you don&#8217;t have access to php.ini, you could try increasing PHP memory  via an .htaccess file. If you do not have an .htaccess file in your domain&#8217;s root folder, you&#8217;ll first need to create one by creating a new file in a <strong>plain text</strong> editor and adding:</p>
<p><code>php_value memory_limit 64M</code></p>
<p>You may run into problems with saving the file. Because .htaccess is a strange file name (the file actually has no name but a 8 letter file extension), it may not be accepted on certain systems (e.g. Windows). With most operating systems, however, all you need to do is to save the file by entering the name as <code>".htaccess"</code> (including the quotes). If this doesn&#8217;t work, you will need to name it something else (e.g. htaccess.txt), upload it to the domain root folder and then rename it using an FTP program</p>
<h3>Via the wp-config.php file</h3>
<p>Download your WordPress wp-config.php file and open it in a <strong>plain text</strong> editor and add:</p>
<p><code>define('WP_MEMORY_LIMIT', '64M');</code></p>
<p>immediately after:</p>
<p><code>define ('WPLANG', '');</code></p>
<p>Then re-upload the changed file.</p>
<h3>Nothing works!</h3>
<p>The methods listed above amy not work with all hosts. If you&#8217;ve tried them all and you&#8217;re still getting fatal error messages, try contacting your hosts for assistance. Just remember to send them a copy of the complete error message and tell them what you have tried so far.</p>
<h3> My hosts won&#8217;t help</h3>
<p>If your hosts insist on limiting your PHP memory allocation to less than 32M, change hosts. You really can&#8217;t run WordPress 3 or above without access to at least 32M.</p>
<p>If you are limited to 32M, it is still possible to run WordPress effectively but you will have to severely limit the number of plugins you use. I&#8217;d also suggest that you steer clear of plugins that parse Post or Page content in either the front or back end of the site as these plugins are likely to be the most memory-hungry. </p>
<p>Start by <a href="http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F">deactivating all plugins</a>, then re-activate them again one-by-one until you hit the same problem. This should give you some idea of how many &#8212; or which &#8212; plugins you can safely use. Repeat the <a href="http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F">mass plugin deactivation</a> again but, this time, only activate those that you have determined to be &#8220;safe&#8221;.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/09/27/wordpress-memory-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What You Need To Know For eShop</title>
		<link>http://quirm.net/2011/09/23/what-you-need-to-know-for-eshop/</link>
		<comments>http://quirm.net/2011/09/23/what-you-need-to-know-for-eshop/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 14:40:07 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[eShop]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3096</guid>
		<description><![CDATA[eShop &#8211; the WordPress eShop ecommerce plugin has fairly extensive documentation but there is a lot you can do before you even install the plugin. Answering and checking off the following question before you start configuring eShop should make the eShop set-up process a little easier for you. Is Your Merchant Gateway eShop Compatible? There&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2009/09/shopping-cart.png" alt="" title="Shopping Cart" width="150" height="150" class="alignleft size-full wp-image-1335" /> <a href="http://wordpress.org/extend/plugins/eshop/">eShop</a> &#8211; the WordPress eShop ecommerce plugin has fairly <a href="http://quirm.net/wiki/eshop/">extensive documentation</a> but there is a lot you can do <strong>before</strong> you even install the plugin.</p>
<p>Answering and checking off the following question before you start configuring eShop should make the eShop set-up process a little easier for you.</p>
<p><span id="more-3096"></span></p>
<h3 style="clear:left;">Is Your Merchant Gateway eShop Compatible?</h3>
<p>There are a number of merchant gateways that you can use with eShop:</p>
<ul>
<li>Authorize.net</li>
<li>eProcessingNetwork</li>
<li>iDeal Lite</li>
<li>PayPal</li>
<li>Payson</li>
<li>Ogone</li>
<li>webtopay</li>
</ul>
<p>But you may need to make changes to your gateway account to ensure that it is compatible with eShop.<br />
<a href="http://quirm.net/wiki/eshop/setting-up-merchant-gateways/">Check your merchant gateway</a></p>
<h3>Do You Have Your Merchant Gateway Details?</h3>
<p>You will need all of the necessary details for your chosen merchant gateway &#8211; e.g. if you&#8217;re using PayPal, you will need the email address that you use on your PayPal account.<br />
<a href="http://quirm.net/wiki/eshop/setting-up-using-eshop/configuration/merchant-gateways/">Setting up eShop merchant gateways</a></p>
<h3>Where Will You Be Shipping To?</h3>
<p>Will you be selling in your own country only (i.e. by State/County/Province)? Or internationally (i.e. by Country)?<br />
<a href="http://quirm.net/wiki/eshop/setting-up-using-eshop/configuration/shipping-rates/#Countries">Defining your shipping locations</a></p>
<h3>Have You Zoned Your Delivery Locations?</h3>
<p>The cost of shipping an item varies according to its destination. eShop allows you to group different delivery locations into &#8220;zones&#8221; &#038; apply different charges accordingly. You can have up to 9 zones.<br />
Have you divided your shipping locations in 1 or more groups &#8211; called &#8220;zones&#8221;<br />
<a href="http://quirm.net/wiki/eshop/setting-up-using-eshop/configuration/shipping-rates/#Zones">What are shipping zones?</a></p>
<h3>Have You Broken Your Products Down Into Shipping Classes?</h3>
<p>The cost of shipping an item can also vary according to its weight, size, cost or fragility. eShop allows you to define up to 5 shipping classes to accommodate these differences with the 6th reserved for free shipping.<br />
<a href="http://quirm.net/wiki/eshop/setting-up-using-eshop/configuration/shipping-rates/#Shipping-Classes">What are shipping classes?</a></p>
<h3>What Are Your Shipping Costs?</h3>
<p>You should have worked out all of your shipping charges and have determined how to apply them.<br />
Will you charge for the first item based on delivery zone &#038; shipping class with a reduced cost for additional items (Method 1)?<br />
Will you charge for the each item based on delivery zone &#038; shipping class with no reduction for additional items (Method 2)?<br />
Will you charge a flat rate based on delivery zone only (Method 3)?<br />
Will you charge based on delivery zone &#038; product weight (Method 4)?<br />
<a href="http://quirm.net/wiki/eshop/setting-up-using-eshop/configuration/shipping-rates/#Shipping-Rate-Calculations">Calculating shipping</a></p>
<h3>Will You Be Applying Tax?</h3>
<p>If you will be applying tax to products &#8211; such as VAT or sales tax &#8211; you will need details of what tax to apply and when. You also need to decide if tax will also be applied to shipping charges.<br />
<a href="http://quirm.net/wiki/eshop/setting-up-using-eshop/configuration/sales-tax/">Setting up sales tax</a></p>
<h3>Will Your Products Offer Choices?</h3>
<p>eShop includes option sets that allow you to add customer-selectable choices to your products. What options can customers choose from when purchasing one of your products? Different sizes? Different colours? Are some colours more expensive? You can set an additional price &#038; weight for each option within a set.<br />
<a href="http://quirm.net/wiki/eshop/setting-up-using-eshop/option-sets/">Using option sets</a></p>
<h3>Do You Have All The Details And Images For A Single Product?</h3>
<p>You will need all of the text plus at least 1 image for a sample product. You also need to be able to set it&#8217;s price, shipping class, options set(s) and tax rates based on your answers to the questions above. This exercise will help you get a handle on how to set up eShop to suit your needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/09/23/what-you-need-to-know-for-eshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using $s with Double Quotes in WordPress</title>
		<link>http://quirm.net/2011/09/20/using-s-with-double-quotes-in-wordpress/</link>
		<comments>http://quirm.net/2011/09/20/using-s-with-double-quotes-in-wordpress/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 19:02:32 +0000</pubDate>
		<dc:creator>Mel</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://quirm.net/?p=3057</guid>
		<description><![CDATA[I came across a really worrying issue recently when a site running one of my own themes failed a PCI compliance test. The template file concerned was search.php and the offending code was &#60;?php printf( __("Sorry - I couldn't find anything on %1$s%2$s%3$s", 'theme_name'), '&#60;span&#62;', $my_searchterm, '&#60;/span&#62;');?&#62; From the test results, it seemed that $my_searchterm&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://quirm.net/wp-content/uploads/2011/09/warning.png" alt="" title="warning" width="150" height="150" class="alignleft size-full wp-image-3061" /> I came across a really worrying issue recently when a site running one of my own themes failed a PCI compliance test. The template file concerned was search.php and the offending code was</p>
<pre><code>&lt;?php printf( __("Sorry - I couldn't find anything on %1$s%2$s%3$s", 'theme_name'), '&lt;span&gt;', $my_searchterm, '&lt;/span&gt;');?&gt;</code></pre>
<p>From the test results, it seemed that <code>$my_searchterm</code> was not being escaped and that this was opening up an XSS-scripting hole. Yet <code>$my_searchterm</code> was escaped!</p>
<p><span id="more-3057"></span></p>
<p><code>$my_searchterm = trim(get_search_query());</code></p>
<p>After much head scratching &#8212; including some in-depth research into using <code>printf</code> with HTML tags &#8212; I&#8217;d pretty much given up on finding the root cause and was about to remove the entire line when Otto came to the rescue.</p>
<p>I&#8217;d been looking in the wrong place. The isse wasn&#8217;t with <code>$my_searchterm</code> &#8212; it was with:</p>
<pre><code>"Sorry - I couldn't find anything on '%1$s%2$s%3$s"</code></pre>
<p>The standard type specifier for a string substitution when using <code>printf</code> or <code>sprintf</code> is <code>$s</code> (<a href="http://uk.php.net/manual/en/function.sprintf.php">PHP documentation link</a>).</p>
<p>However, in WordPress, <code>$s</code> has a special meaning &#8212; it&#8217;s the <strong>unescaped</strong> search query. By using double quotes in the <code>printf</code>, I had stopped <code>$s</code> from being used as a string substitution and, instead, it was being <strong>parsed</strong> by WordPress.</p>
<p>The solution? Switch to using single quotes.</p>
<pre><code>&lt;?php printf( __('Sorry - I couldn\'t find anything on %1$s%2$s%3$s', 'theme_name'), '&lt;span&gt;', $my_searchterm, '&lt;/span&gt;');?&gt;</code></pre>
<p>Now <code>$s</code> isn&#8217;t parsed &#8212; it&#8217;s substituted.</p>
<p>All in all, I was pretty appalled at how easily I had opened up this particular security hole &#8212; despite being paranoid about sanitising generated output. I also can&#8217;t help thinking that the WP core devs weren&#8217;t having a good day when they decided to use <code>$s </code>for the search query &#8212; especially since <code>printf</code> and <code>sprintf</code> string substitutions are commonplace if you are trying to make a theme translation-ready. Something like <code>$wp_s</code> might have been far safer.</p>
<p>In the meantime, check your scripts for double-quote enclosed string substitutions or you might end up making the same mistake I did.</p>
]]></content:encoded>
			<wfw:commentRss>http://quirm.net/2011/09/20/using-s-with-double-quotes-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

