<?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>Anmari &#187; WordPress</title>
	<atom:link href="http://webdesign.anmari.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesign.anmari.com</link>
	<description>Simply effective web services</description>
	<lastBuildDate>Wed, 16 Nov 2011 05:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Trackback Spam Notifications</title>
		<link>http://webdesign.anmari.com/2715/trackback-spam-notifications/</link>
		<comments>http://webdesign.anmari.com/2715/trackback-spam-notifications/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 04:59:52 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2715</guid>
		<description><![CDATA[How to stop wordpress trackback notification spam emails
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/1335/getting-a-list-of-subscribers/' rel='bookmark' title='Getting a list of subscribers'>Getting a list of subscribers</a> <small>Trial, Paid, Expired or Active members For the list of members with their status etc if the list is not...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It is always the &#8216;old&#8217; stuff that gets you.</p>
<p>I thought I had done such a great job tightening up things and then seemed to get hit with some repetitive trackback spam notifications.  Since the notifications are coming from one of MY websites, they don&#8217;t get marked easily as spam.</p>
<p style="text-align: center;"><a href="http://webdesign.anmari.com/wp-content/uploads/trackbackspam.png"><img class="size-full wp-image-2716 aligncenter" title="trackbackspam" src="http://webdesign.anmari.com/wp-content/uploads/trackbackspam.png" alt="Screenshot of email trackback notification" width="440" height="121" /></a></p>
<p>A few minutes of googling and a timely post at <a href="http://www.question-defense.com/2011/11/05/disable-trackbacks-in-existing-wordpress-blog-stop-wordpress-trackback-spam">question-defence.com</a>, published a few days ago pin pointed the problem (Many thanks to google for thier quick search index updating!.. remember the old days?)</p>
<h2>Ping status =  &#8216;open&#8217;</h2>
<p>Many existing posts still had their ping status set to open.  So to stop trackback spam in it&#8217;s tracks (ha! lqtm), take action as follows:</p>
<h3>Future posts:</h3>
<ol>
<li>Go to WordPress settings &gt; Discussions &gt;</li>
<li>untick &#8220;Allow Link Notifications From Other Blogs&#8221;</li>
</ol>
<h3>Past Posts:</h3>
<ol>
<li>Hop into your phpmyadmin</li>
<li>Find your posts table, note the name with your sites prefix</li>
<li>Goto the SQL view, type in</li>
</ol>
<p><code>update</code>  prefix-<code>posts </code><code>set</code> <code>ping_status = </code><code>'closed'</code><code>;</code></p>
<p>&nbsp;</p>
<p>and you are done.  All posts and custom post types now set to NOT accept trackbacks.</p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/1335/getting-a-list-of-subscribers/' rel='bookmark' title='Getting a list of subscribers'>Getting a list of subscribers</a> <small>Trial, Paid, Expired or Active members For the list of members with their status etc if the list is not...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2715/trackback-spam-notifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Initial content for a new page or post &#8211; wordpress pleasant surprise</title>
		<link>http://webdesign.anmari.com/2643/initial-content-for-a-new-page-or-post-wordpress-pleasant-surprise/</link>
		<comments>http://webdesign.anmari.com/2643/initial-content-for-a-new-page-or-post-wordpress-pleasant-surprise/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 07:01:59 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2643</guid>
		<description><![CDATA[How to create a link to the add new page or post with default starting content
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/1649/shortcode-any-widget/' rel='bookmark' title='Shortcode a widget in a page or post'>Shortcode a widget in a page or post</a> <small>Shortcodize a widget - Use any widget in a shortcode in a page or post...</small></li>
<li><a href='http://webdesign.anmari.com/536/submenu-page-slug-attached-media-confusion/' rel='bookmark' title='Submenu, Page, slug, attached media confusion'>Submenu, Page, slug, attached media confusion</a> <small>I had a really odd one today.  A client had added text to a submenu page that was either empty...</small></li>
<li><a href='http://webdesign.anmari.com/113/category-specific-css-to-achieve-a-print-cover-page-css-look/' rel='bookmark' title='Category specific css to achieve a print &#8220;cover page&#8221; css look'>Category specific css to achieve a print &#8220;cover page&#8221; css look</a> <small>For a school&#8217;s online newsletter we wanted the &#8220;photo of the week&#8221; category to present differently from other posts. Ideally...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I wanted to help new users of my amr-ical-events-list plugin to get started.  I wanted</p>
<ul>
<li>a link to the <strong>add new page</strong></li>
<li>preferably with <strong>suggested title and content</strong></li>
</ul>
<p>I wondered???, I googled, I browsed some of the WordPress code and found naught, nought, null, or at least nothing obvious&#8230;</p>
<p><strong>and then I just tried it.</strong></p>
<p>&#8216;Content&#8217; was easy I had a few attempts at &#8216;title&#8217;, the found &#8216;post_title&#8217; worked.</p>
<p>Hooray! A small thing but quite satisfying and of course I felt a need to share&#8230;.</p>
<h2>The Result</h2>
<div id="attachment_2644" class="wp-caption aligncenter" style="width: 394px"><a href="http://webdesign.anmari.com/wp-content/uploads/newpage.png"><img class="size-full wp-image-2644" title="newpage" src="http://webdesign.anmari.com/wp-content/uploads/newpage.png" alt="Screen shot showing it works" width="384" height="239" /></a><p class="wp-caption-text">Seeing is believing</p></div>
<h2>The php code:</h2>
<p>&nbsp;</p>
<pre>echo '&lt;a title="'
.__('Create a calendar page','amr-ical-events-list')
.'" href="'.admin_url('post-new.php?post_type=page&amp;amp;content=[iCal http://youricsurl.ics]&amp;amp;post_title='
.__('Calendar','amr-ical-events-list')).'"&gt;'
__('Add new') // use wp translation
.'&lt;/a&gt;';</pre>
<div id="attachment_2645" class="wp-caption aligncenter" style="width: 494px"><a href="http://webdesign.anmari.com/wp-content/uploads/adminscreen.png"><img class="size-full wp-image-2645" title="adminscreen" src="http://webdesign.anmari.com/wp-content/uploads/adminscreen.png" alt="" width="484" height="301" /></a><p class="wp-caption-text">Link from settings or plugin page</p></div>
<p>&nbsp;</p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/1649/shortcode-any-widget/' rel='bookmark' title='Shortcode a widget in a page or post'>Shortcode a widget in a page or post</a> <small>Shortcodize a widget - Use any widget in a shortcode in a page or post...</small></li>
<li><a href='http://webdesign.anmari.com/536/submenu-page-slug-attached-media-confusion/' rel='bookmark' title='Submenu, Page, slug, attached media confusion'>Submenu, Page, slug, attached media confusion</a> <small>I had a really odd one today.  A client had added text to a submenu page that was either empty...</small></li>
<li><a href='http://webdesign.anmari.com/113/category-specific-css-to-achieve-a-print-cover-page-css-look/' rel='bookmark' title='Category specific css to achieve a print &#8220;cover page&#8221; css look'>Category specific css to achieve a print &#8220;cover page&#8221; css look</a> <small>For a school&#8217;s online newsletter we wanted the &#8220;photo of the week&#8221; category to present differently from other posts. Ideally...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2643/initial-content-for-a-new-page-or-post-wordpress-pleasant-surprise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faster please, faster &#8211; how to use WordPress as a CMS successfully &#8211; by mhansen</title>
		<link>http://webdesign.anmari.com/2589/faster-please-faster-how-to-use-wordpress-as-a-cms-successfully-by-mhansen/</link>
		<comments>http://webdesign.anmari.com/2589/faster-please-faster-how-to-use-wordpress-as-a-cms-successfully-by-mhansen/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 03:09:26 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2589</guid>
		<description><![CDATA[Tips from conversations at webmaster world, and alter about timthumb vulnerability. 
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/767/why-cms/' rel='bookmark' title='Why CMS?'>Why CMS?</a> <small>CMS stands for Content Management System. The good CMS&#8217;s now are so good, that in my view no-one should be...</small></li>
<li><a href='http://webdesign.anmari.com/135/improve-your-wordpress-webs-security-prevention/' rel='bookmark' title='Improve your wordpress web&#8217;s security &#8211; Prevention'>Improve your wordpress web&#8217;s security &#8211; Prevention</a> <small>Easy improvements for the non-technical: are you displaying your username for all the hackers to see? Go to your wordpress...</small></li>
<li><a href='http://webdesign.anmari.com/411/wordpress-user-training/' rel='bookmark' title='WordPress user training'>WordPress user training</a> <small>Web Designers sometimes neglect to factor in the training and hand holding required to get website owners comfortable with managing...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_2590" class="wp-caption aligncenter" style="width: 437px"><a href="http://www.flickr.com/photos/mauropm/3291100981/"><img class="size-full wp-image-2590" title="fast2" src="http://webdesign.anmari.com/wp-content/uploads/fast2.jpg" alt="" width="427" height="277" /></a><p class="wp-caption-text">Faster Phidus, FASTER! - original photo by mauropm</p></div>
<p>There&#8217;s a <a title="scroll down to mhansen" href="http://www.webmasterworld.com/wordpress/4346430.htm">good post over at webmasterworld</a> with advice on how to speed up WordPress when using it as a cms, plus a few other tips.  Also if you are using a theme that came packaged with timthumb, <a href="http://markmaunder.com/2011/zero-day-vulnerability-in-many-wordpress-themes/">read this</a> and take action to <strong>avoid being hacked.</strong></p>
<p>There was no way to  boomark the individual useful comment  that I could find, so I &#8216;ve taken the liberty of summarising here, with a link to the original complete conversation &#8211; <a href="http://www.webmasterworld.com/printerfriendlyv5.cgi?forum=152&amp;discussion=4346430&amp;serial=4347406&amp;user=">print version here</a>.<br />
1 &#8211; Get a dedicated server. The slowdown on a shared or VPS is at the database. {They} used to run the W3 cache plugin, but now only use the &#8220;<a href="http://wordpress.org/extend/plugins/force-gzip/">Force GZip</a>&#8221; plugin.</p>
<p>1A &#8211; Keep your database clean with an optimizer type plugin (or do it yourself) that weekly, backs it up than cleans up scuttle from the database.</p>
<p>2 &#8211; Security &#8211; Never load more plugins that you need to run the site, and always limit access to your wp-admin directory within the htaccess. <del>We</del> {They} deny all but 3-4 IP addresses from accessing the admin sections.</p>
<p>2A &#8211; Delete all unused themes and plugins&#8230; Even if they aren&#8217;t active!</p>
<p>3 &#8211; Using the wp-config.php file, turn off post revision tracking.</p>
<p>4 &#8211; If you are using WP as a CMS, use it as a CMS! <del>We</del> {They} use pages for 75-80% of our landing page content, and only use the post features to compliment our pages. Use .html as a file extension on pages and posts&#8230; and take GREAT care to make sure the index taxonomy is correct from page to category of post when used.</p>
<p>5 &#8211; Tags and Categories are always noindexed for us. The PAGES are our primary landing areas, and the tags and categories ultimately support them.</p>
<p>6 &#8211; Clean up your themes to the N&#8217;th degree. <del>We</del> use a speed tool that waterfalls the http requests so you can really clean it at the file level.</p>
<p>7 &#8211; Always use sitemaps, both xml and reader sitemaps.</p>
<p>8 &#8211; Favorite admin plugin, <a href="http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/">Ozh Horizontal Admin Menu plugin by Ozh</a>. It relocates the admin menu to the top of the site and frees up much needed horizontal space for writing.</p>
<p>&nbsp;</p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/767/why-cms/' rel='bookmark' title='Why CMS?'>Why CMS?</a> <small>CMS stands for Content Management System. The good CMS&#8217;s now are so good, that in my view no-one should be...</small></li>
<li><a href='http://webdesign.anmari.com/135/improve-your-wordpress-webs-security-prevention/' rel='bookmark' title='Improve your wordpress web&#8217;s security &#8211; Prevention'>Improve your wordpress web&#8217;s security &#8211; Prevention</a> <small>Easy improvements for the non-technical: are you displaying your username for all the hackers to see? Go to your wordpress...</small></li>
<li><a href='http://webdesign.anmari.com/411/wordpress-user-training/' rel='bookmark' title='WordPress user training'>WordPress user training</a> <small>Web Designers sometimes neglect to factor in the training and hand holding required to get website owners comfortable with managing...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2589/faster-please-faster-how-to-use-wordpress-as-a-cms-successfully-by-mhansen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to give your plugin pluggable functions</title>
		<link>http://webdesign.anmari.com/2572/how-to-give-your-plugin-pluggable-functions/</link>
		<comments>http://webdesign.anmari.com/2572/how-to-give-your-plugin-pluggable-functions/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 12:03:39 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2572</guid>
		<description><![CDATA[How to give your plugin pluggable functions and how to override a pluggable function by defining your own.
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/2312/activation-error-plugin-does-not-have-valid-header-still-activates/' rel='bookmark' title='Plugin does not have valid header.. still activates'>Plugin does not have valid header.. still activates</a> <small>Wordpress invalid plugin header problems when activating uploaded zip files...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/events-plugin/' rel='bookmark' title='Events Plugin'>Events Plugin</a> <small>The paid version The amr-events plugin is available here (my main site).  Please register or if already a member, please...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_2574" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.flickr.com/photos/gladius/2270640833/"><img class="size-full wp-image-2574" title="The amazing pluggable machine " src="http://webdesign.anmari.com/wp-content/uploads/plugs.jpg" alt="" width="500" height="333" /></a><p class="wp-caption-text">The amazing pluggable machine - photo by lukasWP</p></div>
<p>Pluggable functions are functions that can be overridden by others.  The key is which is defined <strong>first</strong>.  So to make one <strong>your plugin&#8217;s functions pluggable</strong> one should define it  as late as possible.  So others can get in first of course, but not so late that your plugin tries to use it before it is defined.</p>
<p>Understanding the <a title="Wordpress actions and their sequence." href="http://codex.wordpress.org/Plugin_API/Action_Reference">sequence of wordpress actions</a> is important.</p>
<p>To make your plugin function pluggable by a theme or another plugin it needs to be defined AFTER the themes and the other plugins. So if your functions are mainly to do with output, you could move them as far back as the &#8216;wp&#8217; action say.</p>
<h2>In your main plugin file:</h2>
<pre>add_action ('wp','amr_load_pluggables', 10);    //move it later and a low priority

function amr_load_pluggables() {
    require_once('amr-pluggable.php');
}</pre>
<h2>The Pluggable Functions</h2>
<p>Each pluggable function must test that it has not already been defined</p>
<pre>if (!function_exists( 'the_pluggable_function')) {
    the_pluggable_function($parameters) {
    // the code
    }
}</pre>
<h2>The Override Function</h2>
<p>The coder doing the overwriting  (ie plugging the pluggable function ) then just defines the function normally in their own plugin, or in their themes functions.php.  All they have to do is not bury it inside an action that executes AFTER the &#8216;wp&#8217; action (or the action that loads the pluggable files).</p>
<p>Oh and it would be a good idea to fully understand where / when that pluggable function gets called and what it is supposed to do, what values to return etc.  You do not want to cause nasty side effects.  Looking at the code of the pluggable function is a good place to start.</p>
<h2>Conditional Override</h2>
<p>If they wanted to only override under certain circumstances, EG:  If you want to override ONLY on certain post types and only if certain conditions are met on the single view, then one could do</p>
<pre>add_action('wp', 'define_my_override_function', 1) {</pre>
<pre>// using wp action as well as we need the post query et to have been done already, but a higher priority so will execute before the pluggable function load.</pre>
<pre>}</pre>
<pre>function define_my_override_function() {
global $post;</pre>
<pre>    if (is_single() and ($post-&gt;post_type === 'event') and (whatever other criterai)) {
 // then overwrite the pluggable, requires the pluggable loading to be later in the wp action sequence, say on action 'wp' late priority</pre>
<pre>        function the_pluggable_function($parameters) {</pre>
<pre>        // your code here</pre>
<pre>        }
     }
}</pre>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/2312/activation-error-plugin-does-not-have-valid-header-still-activates/' rel='bookmark' title='Plugin does not have valid header.. still activates'>Plugin does not have valid header.. still activates</a> <small>Wordpress invalid plugin header problems when activating uploaded zip files...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/events-plugin/' rel='bookmark' title='Events Plugin'>Events Plugin</a> <small>The paid version The amr-events plugin is available here (my main site).  Please register or if already a member, please...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2572/how-to-give-your-plugin-pluggable-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post meta key, sometimes case sensitive, sometimes not&#8230;..</title>
		<link>http://webdesign.anmari.com/2561/post_meta-sometimes-case-sensitive-sometimes-not/</link>
		<comments>http://webdesign.anmari.com/2561/post_meta-sometimes-case-sensitive-sometimes-not/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 07:40:58 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2561</guid>
		<description><![CDATA[get_post_meta, update_post_meta, delete_post_meta and uppercase, lowercase meta keys..... case insensitivities play havoc when they are not consistent.
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/92/strange-characters/' rel='bookmark' title='Upgrading to Mysql5 &#8211; more strange characters'>Upgrading to Mysql5 &#8211; more strange characters</a> <small>An upgrade of a wordpress site&#8217;s Database from Mysql 4 to Mysql 5 gave some surprising results &#8211; some strange...</small></li>
<li><a href='http://webdesign.anmari.com/2336/permalinks-custom-post-types-and-taxonomies-conflicts/' rel='bookmark' title='Permalinks, custom post types and taxonomies, conflicts'>Permalinks, custom post types and taxonomies, conflicts</a> <small>How to avoid clash, conflict and 404 problems with permalinks, custom post types and taxonomies....</small></li>
<li><a href='http://webdesign.anmari.com/2643/initial-content-for-a-new-page-or-post-wordpress-pleasant-surprise/' rel='bookmark' title='Initial content for a new page or post &#8211; wordpress pleasant surprise'>Initial content for a new page or post &#8211; wordpress pleasant surprise</a> <small>How to create a link to the add new page or post with default starting content...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_2562" class="wp-caption aligncenter" style="width: 569px"><a href="http://www.flickr.com/photos/gazeronly/5700884740/"><img class="size-full wp-image-2562" title="lowercase" src="http://webdesign.anmari.com/wp-content/uploads/lowercase.jpg" alt="" width="559" height="147" /></a><p class="wp-caption-text">Lower case love... by gazeronly</p></div>
<p>If you have been banging your head against the proverbial brickwall trying to debug a intermittment post_meta bug then this may help.</p>
<p>I googled all aspects, but did not find any post to shed light.  Eventually figured it out&#8230;.</p>
<p>Put simply:</p>
<ul>
<li>get_post_meta() <strong>is case sensitive on the meta-key</strong></li>
</ul>
<p>BUT</p>
<ul>
<li>update_post_meta is <strong>NOT case sensitive</strong></li>
</ul>
<p>Thus If there is a pre-existing meta record with a key in UPPERCASE, then one can</p>
<ol>
<li><strong>issue an update for a lowercase key</strong> that will</li>
<li><strong>update the UPPERCASE key</strong>, and not create a lower case record. (Usually update will &#8216;add&#8217; if no record exists).</li>
</ol>
<p><strong>Delete_post_meta()</strong> has the same behaviour &#8211; you can try to delete a lowercase key, but the uppercase version will get deleted (too?)</p>
<p>Then of course when you try to fetch with your same lwoercase key that you did the update with, the fetch will fail as it does not exist &#8211; only the uppercase key exists.</p>
<h3>That was fun trying to debug&#8230;&#8230;</h3>
<p>See <a title="update_post_meta case insensitive" href="https://core.trac.wordpress.org/ticket/18210">trac ticket</a> raised for details or progress.</p>
<h2>Mysql db collation</h2>
<p>It seems it has a lot to do with the mysql db collation being used.  The default in many db setups is a _ci (case insensitive one) &#8211; they are faster and give more &#8216;natural&#8217; sort orders, although that very much depends on the language you are using.</p>
<p>The get_post_meta behaves differently apparently because wordpress caches the data so one is not necessarily querying the database.</p>
<p>If you are keen to know more, see</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-collations.html">Mysql collation issues</a>, and</li>
<li><a href="http://hakre.wordpress.com/2010/12/26/wordpress-database-charset-and-collation-configuration/">Hakre&#8217;s notes on wordpress-database-charset-and-collation-configuration</a></li>
</ul>
<p>&nbsp;</p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/92/strange-characters/' rel='bookmark' title='Upgrading to Mysql5 &#8211; more strange characters'>Upgrading to Mysql5 &#8211; more strange characters</a> <small>An upgrade of a wordpress site&#8217;s Database from Mysql 4 to Mysql 5 gave some surprising results &#8211; some strange...</small></li>
<li><a href='http://webdesign.anmari.com/2336/permalinks-custom-post-types-and-taxonomies-conflicts/' rel='bookmark' title='Permalinks, custom post types and taxonomies, conflicts'>Permalinks, custom post types and taxonomies, conflicts</a> <small>How to avoid clash, conflict and 404 problems with permalinks, custom post types and taxonomies....</small></li>
<li><a href='http://webdesign.anmari.com/2643/initial-content-for-a-new-page-or-post-wordpress-pleasant-surprise/' rel='bookmark' title='Initial content for a new page or post &#8211; wordpress pleasant surprise'>Initial content for a new page or post &#8211; wordpress pleasant surprise</a> <small>How to create a link to the add new page or post with default starting content...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2561/post_meta-sometimes-case-sensitive-sometimes-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debug a wordpress plugin or theme &#8211; for non-developers</title>
		<link>http://webdesign.anmari.com/2490/debug-a-wordpress-plugin-or-theme-for-non-devleopers/</link>
		<comments>http://webdesign.anmari.com/2490/debug-a-wordpress-plugin-or-theme-for-non-devleopers/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 02:03:16 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2490</guid>
		<description><![CDATA[For non-developers - how to debug a plugin or theme, or at least provide some better information about why it does no work on your install, while it seems to work elsewhere.
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/1088/installing-your-members/' rel='bookmark' title='Looks good, dived in with a developers license'>Looks good, dived in with a developers license</a> <small>A record or informal guide of the installation process of the Your Members wordpress membership plugin....</small></li>
<li><a href='http://webdesign.anmari.com/2478/wordpress-user-reporting-plugin-has-a-new-site/' rel='bookmark' title='wordpress user reporting plugin has a new site'>wordpress user reporting plugin has a new site</a> <small>The amr wordpress users plugin for flexible user reporting now has it&#8217;s own site:...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It works for others, but not for you &#8211; what&#8217;s happening?</p>
<ul>
<li><a href="#rules">Rules for dealing with a  new plugin, or theme or an upgrade</a></li>
<li><a href="#debugsteps">Debugging the plugin or theme on your site</a></li>
<li><a href="#reporting">Reporting a problem – the rules of engagement</a></li>
<li><a href="#developers">Debugging for plugin developers</a></li>
</ul>
<h2>
<div id="attachment_2499" class="wp-caption aligncenter" style="width: 310px"><a href="http://webdesign.anmari.com/wp-content/uploads/deadbugblood-bygagstreet.jpg"><img class="size-medium wp-image-2499" title="deadbugblood-bygagstreet" src="http://webdesign.anmari.com/wp-content/uploads/deadbugblood-bygagstreet-300x216.jpg" alt="picture of a dead bug and blood" width="300" height="216" /></a><p class="wp-caption-text">Don&#39;t sweat blood over a bug</p></div></h2>
<h2>Rules for dealing with a  new plugin, or theme or an upgrade:</h2>
<ul>
<li><strong>READ the instructions</strong>, okay some plugins can be intuitive, but some may need a crucial step.  Go back and check that you have not missed something
<ul>
<li>Check the readme.txt (or the WordPress.org site &#8211; shoudl be the same)</li>
<li>Check the plugins own site</li>
<li>Check the settings.
<ul>
<li>I like to code my plugin in such a way that you do not have to even look at the settings, it should still work with a default setup, but not everyone does &#8211; some people do not even check the settings.  Some developers put their settings in strange places &#8211; I found one whose settings were reached off the plugin listing line, but only when you hovered over the plugin line!</li>
<li>I also tend to put some explanatory text, or links to explanations in the settings area near the relevant area</li>
</ul>
</li>
</ul>
</li>
<li><strong>READ the changelog</strong>.  If the author is diligent, there should be detailed description of the changes.  If there is no detailed description, assume anything could have changed.  If it says ANYTHING about a <strong>database change,</strong> you definitely need to
<ul>
<li>switch <strong>maintenance mode</strong> on &#8211; a number of plugins can do this for you</li>
<li>do a <strong>backup that includes the database, </strong>and know how to restore it!</li>
</ul>
</li>
<li>If the plugin is<strong> crucial, check the forums BEFORE </strong>you upgrade<strong>. </strong>If you are really unlucky you may be the first to flush out a bug or clash, but the odds are someone will have got there before you.</li>
<li><strong>Test</strong> the new plugin, theme or upgrade on a <strong>test server first, </strong>with other crucial plugins active<strong>.</strong> NEVER ever apply it to your live site straight off, even if you trust the developer.  There are infinite combinations of circumstances and your site may just find one that breaks the plugin.</li>
<li>Have a <strong>backup that</strong> <strong>YOU know how to restore</strong>.   Yes it seems it is  not obvious to all, but it is  no good having a backup if you have no idea how to use it.  Hopefully your host has a simple option for you &#8211; be aware of lead times if you need their input.</li>
<li><strong>Do not start late</strong> at night.  If you hit a problem at past 10pm at night, stop, reverse, go to bed. (Yes I&#8217;m a mother, but I also know when <strong>I am not  being effective.  I do not like to waste my time</strong>.)</li>
</ul>
<h3>Only break these rules if&#8230;</h3>
<p>you are able to cope with the consequences of  a problem</p>
<ol>
<li>simple actions you may need to do could be  to get the prior version of the code and ftp that over the &#8216;new&#8217; version</li>
<li>worst may be having to reverse an updated database (and no backup),</li>
<li>or have the plugin deactivated for a while.</li>
</ol>
<h2 id="debugsteps">Debugging the plugin or theme on your site</h2>
<p>If it is a simple, obvious problem or visible error, a &#8220;fatal error&#8221;, &#8220;warning&#8221; or &#8220;notice&#8221;, then an internet search, or forum search both at wp and at a plugin own site,  using the words but removing anything that relates to your site can be very useful and give you a quick sense of what may be wrong. It may educate about the WordPress functionality is use.</p>
<p>Common things are :</p>
<ul>
<li>permalinks needing flushing with custom post types and taxonomies,</li>
<li>missing a wp function  due to an old wp install,</li>
<li>function or class naming clash with a theme or another plugin</li>
<li>etc</li>
</ul>
<h3 id="notobvious">Not a simple, obvious problem, or plugin developer cannot recreate the problem?</h3>
<p>If it is <strong>not a simple, obvious problem</strong> or a visible error, then you may need to do one of the following. Both  are looking for a clash or trying to isolate the circumstances that cause the problem</p>
<ol>
<li><strong>Go backwards</strong> &#8211; Either start with your test server and switch off  plugins, one by one,  testing the plugin in question after each step, or</li>
<li><strong>Start at the beginning and go forwards</strong> &#8211; start with a clean install and add in the plugins and themes one by one</li>
</ol>
<p>This may seem cumbersome, but sometimes it is the only way.  It can also be highly informative about the plugins you are using and/or the theme.  before you all of this, though <strong>check first</strong>:</p>
<ul>
<li>Is it an <strong>old WordPress</strong>? If yes, try on a new clean install with latest</li>
<li>Did you just upgrade to <strong>latest WordPress</strong> and was it just released ?  the plugin may not yet be compatible with something that changed in WordPress.</li>
<li>It is the <strong>php version</strong>?  the plugin should work on the &#8216;most&#8217; common  php version, which at time of writing is 5.2  See  <a title="WordPress statistics" href="http://wordpress.org/about/stats/">http://wordpress.org/about/stats/</a>.  If your php is old or very new, this may be it.  You need to be able to tell the developer what php you are using.</li>
</ul>
<h3>Be methodical</h3>
<p>Be careful that you are doing the necessary steps to adequately test at each step, so you do not waste your time. Do you need</p>
<ul>
<li>refresh the browser and /or clear the cache&#8217;</li>
<li>logout / login (depends on the functionality of the plugin)</li>
</ul>
<h3>The objective</h3>
<p>You want to be able to honestly tell the developer that you have tested the plugin on a</p>
<ul>
<li> <strong>clean (non customised) </strong><strong>WordPress</strong><strong> install, </strong>preferably with the latest WordPress version<strong><br />
</strong></li>
<li>with the current<strong> default theme (eg: twentyten) </strong>and</li>
<li><strong>no other plugins active </strong>(or maybe only standard plugins active)</li>
</ul>
<p>It is highly unlikely that you will get  to this point without  finding some thing out. Examples:</p>
<ul>
<li>a clash with a theme or other plugin</li>
<li>if it worked on a clean new wp install, it may be that your database or your<strong> </strong><strong>WordPress</strong><strong> </strong>is corrupted. Scary, does happen.  Sometimes even a clean WordPress install gets corrupted and one has to &#8220;install&#8221; it twice.  I&#8217;ve seen people describe this.</li>
</ul>
<h2 id="reporting">Reporting a problem &#8211; the rules of engagement</h2>
<ul>
<li><strong>Do NOT struggle for multiple hours</strong>, getting more frustrated.  Take a tea break, go for a walk, get a nights sleep.  Check for environment changes&#8230; i&#8217;ve seen people curse WordPress and a developer only to shamefacedly report back after a day or so to report why it was actually something that had happened on their side.</li>
<li><strong>Report early to the plugin</strong> forum &#8211; you may be highlighting something new, the sooner the developer knows, the quicker they can address it.  Use some good judgement about how early to flag an error, but do continue with the debug steps.</li>
<li><strong>BUT DO not report</strong> without doing <strong>some of your own debugging</strong>.  Your situation may be unique.</li>
<li><strong>Be specific</strong> &#8211; report  with <strong>as much information as possible</strong> .   &#8220;It does not work&#8221; is not helpful to anyone.  Clearly it will have worked for <strong>some people or most likely many.</strong> The more info you can provide, the more likely you will get quick resolution.</li>
<li>Unless you have a <strong>support contract with a guaranteed response time</strong>, do not realistically expect better than a 48 hour to 1 week turnaround, or even one at all in the case of free plugins or ones that explicitly exclude guaranteed support. It doesn&#8217;t mean that they do not support it, it just means they are unable to guarantee it &#8211; this is quite reasonable &#8211; particularly if the the developers are a small organisation or an individual. For example most of you know that  I usually get to a question within hours, but cannot guarantee that, so I explicitly exclude guaranteed support in my terms.</li>
<li>When reporting, have <strong>good manners</strong> and remember <strong>timezones</strong>.  You never know what is happening in someone else world (births, deaths, tsunamis, earthquakes, snake bites, sick children, broken fibre optic undersea cables, loss of power, loss of internet&#8230;) .</li>
</ul>
<h2 id="developers">Debugging for plugin developers</h2>
<p>Most of the above applies to you too! however there is more. Mostly I recommend</p>
<ul>
<li>always working with php and mysql  ALL errors, warnings, notices etc switched on.</li>
<li>test on multiple platforms and browsers</li>
<li>before releasing an upgrade, test on existing (upgrade) and one new clean install</li>
</ul>
<p>For more details, see</p>
<ul>
<li><a href="http://andrewnacin.com/2010/04/23/5-ways-to-debug-wordpress/">http://andrewnacin.com/2010/04/23/5-ways-to-debug-wordpress/</a> (a key wp developer)</li>
<li><a href="http://fuelyourcoding.com/simple-debugging-with-wordpress/">http://fuelyourcoding.com/simple-debugging-with-wordpress/</a></li>
<li><a href="http://wordpress.org/extend/plugins/search.php?q=debug">http://wordpress.org/extend/plugins/search.php?q=debug</a> &#8211; some plugins that may help. Personally I sue my own little dummy debug plugin that switched all errors one and off as I activate and deactivate it.</li>
</ul>
<p><div id="attachment_2500" class="wp-caption aligncenter" style="width: 171px"><img class="size-full wp-image-2500" title="updateall" src="http://webdesign.anmari.com/wp-content/uploads/updateall.jpg" alt="Update all plugins" width="161" height="233" /><p class="wp-caption-text">It&#39;s tempting.. but should you?</p></div>
<p>Judge the risk/benefit tradeoff before you click that one step upgrade all &#8211; you are the one responsible!</p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/1088/installing-your-members/' rel='bookmark' title='Looks good, dived in with a developers license'>Looks good, dived in with a developers license</a> <small>A record or informal guide of the installation process of the Your Members wordpress membership plugin....</small></li>
<li><a href='http://webdesign.anmari.com/2478/wordpress-user-reporting-plugin-has-a-new-site/' rel='bookmark' title='wordpress user reporting plugin has a new site'>wordpress user reporting plugin has a new site</a> <small>The amr wordpress users plugin for flexible user reporting now has it&#8217;s own site:...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2490/debug-a-wordpress-plugin-or-theme-for-non-devleopers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Permalinks, custom post types and taxonomies, conflicts</title>
		<link>http://webdesign.anmari.com/2336/permalinks-custom-post-types-and-taxonomies-conflicts/</link>
		<comments>http://webdesign.anmari.com/2336/permalinks-custom-post-types-and-taxonomies-conflicts/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 10:00:07 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2336</guid>
		<description><![CDATA[How to avoid clash, conflict and 404 problems with permalinks, custom post types and taxonomies.
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/2264/wp_dropdown_categories-with-taxonomies/' rel='bookmark' title='wp_dropdown_categories with taxonomies'>wp_dropdown_categories with taxonomies</a> <small>Fix - custom drop down categories with taxonomy...</small></li>
<li><a href='http://webdesign.anmari.com/2204/wordpress-installation-checklist/' rel='bookmark' title='WordPress Installation Checklist'>WordPress Installation Checklist</a> <small>Installation Cheatsheet for wp 3.0 up.  WordPress has improved so much, many of the checklists on the web include unnecessary...</small></li>
<li><a href='http://webdesign.anmari.com/1649/shortcode-any-widget/' rel='bookmark' title='Shortcode a widget in a page or post'>Shortcode a widget in a page or post</a> <small>Shortcodize a widget - Use any widget in a shortcode in a page or post...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Around the various forums, I see a number of concerned folk struggling with permalinks.  There is a variety of advice, most of which is about flushing your permalinks (goto settings &gt; permalinks).  This does not always work and sometimes there are weird clashes or conflicts.  There is an important point that is not visibly made and perhaps not obvious to many:</p>
<h3>Unique permalink URLS</h3>
<p>However you setup your permalinks, custom post types and taxonomies, you need to ensure that the <strong>resulting permalink urls will be unique </strong>so that the system can identify the post or custom post content correctly and the url&#8217;s generated do not conflict.  Else the first rule to fire will determine what is returned.</p>
<p>I first encountered this problem way before post types and taxonomies when a client had an image named the same as a post, with some weird results in certain situations &#8211; took me a while to figure that out!</p>
<p>To demonstrate the problem, I</p>
<ol>
<li>defined my permalink structure using <strong>/%category%/%postname%/</strong></li>
<li>created a <strong>category called event</strong> and</li>
<li>activated my event plugin that has a <strong>&#8216;event&#8217; custom post type. </strong></li>
<li> I then created two posts called the same &#8220;CPT 99999&#8243;</li>
</ol>
<div id="attachment_2337" class="wp-caption aligncenter" style="width: 319px"><a href="http://webdesign.anmari.com/wp-content/uploads/eventcat.png"><img class="size-full wp-image-2337" title="eventcat" src="http://webdesign.anmari.com/wp-content/uploads/eventcat.png" alt="" width="309" height="279" /></a><p class="wp-caption-text">A standard post in a category called event</p></div>
<p>When I click down from the standard post category archive instead of getting the standard post, I get the custom post type event with the same name.  There are two rules leading to/from the same url.  The first will win.</p>
<div id="attachment_2338" class="wp-caption aligncenter" style="width: 416px"><a href="http://webdesign.anmari.com/wp-content/uploads/eventtype.png"><img class="size-full wp-image-2338" title="eventtype" src="http://webdesign.anmari.com/wp-content/uploads/eventtype.png" alt="" width="406" height="288" /></a><p class="wp-caption-text">Clicking down on the standard post takes me to the custom post type event</p></div>
<h2>Solutions</h2>
<h3>1. for new systems, or where you can still change the permalink structure:</h3>
<p>Make sure that you have something that will guarantee uniqueness in your permalink structure.  Since I usually do not feel the need to have the category name in my permalinks, I use /%post_id%/%postname%/ which will always give me a unique url ! &#8211; and since my audience is mostly technical, I am not concerned about the post id in the url.</p>
<h3>2. for existing systems with many posts</h3>
<p>Essentially you must ensure that each url somehow generates a unique url &#8211; this may mean changing some slugs somewhere (posts, custom, taxonomies or categories)</p>
<h2>Consider also reversed words</h2>
<p>I had the sense in my taxonomy code for the amr-events plugin to check for <a href="http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms">wordpress &#8220;reserved&#8221; words</a> and prevent prevent creation of a taxonomy that uses them.  This sort of  checking may need to go further, although as pointed out  <a href="http://lists.automattic.com/pipermail/wp-trac/2009-April/041913.html">here</a> in response to <a href="http://lists.automattic.com/pipermail/wp-trac/2009-April/041838.html">this question</a>, it is not much different from the risk of plugin function names or input form names overlapping with reserved words.  Plugin, theme authors and web developers need  to bear these risks in mind.</p>
<h3>More information:</h3>
<ul>
<li><a href="http://codex.wordpress.org/Using_Permalinks#Choosing_your_permalink_structure">http://codex.wordpress.org/Using_Permalinks#Choosing_your_permalink_structure</a> and</li>
<li><a href="http://ottopress.com/2010/category-in-permalinks-considered-harmful/">http://ottopress.com/2010/category-in-permalinks-considered-harmful/</a></li>
<li><a href="http://lists.automattic.com/pipermail/wp-testers/2010-May/013010.html">http://lists.automattic.com/pipermail/wp-testers/2010-May/013010.html</a></li>
<li><a href="http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#conflict">http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#conflict</a></li>
</ul>
<h3>Key points extracted from above:</h3>
<ul>
<li>Custom Post Types have a URL of <strong>/slug/postname</strong>.   The &#8220;with_front&#8221;  option lets you make that into /something/slug/postname, if you happen to have a post permalink structure with a prefix on it (like /text/%postname% or something)</li>
<li>Don&#8217;t setup a permalink structure that will <strong>clash with the archive structure</strong>. e.g. say you only had one post a day and wanted to use: %year%%monthnum%%day%, links so generated will be interpreted as the archive of all posts for that day.</li>
<li>Add taxonomies slowly, one by one &#8211; verify that permalinks continue to work each step of the way.</li>
<li>For performance reasons, it is <strong>not a good idea</strong> to start your permalink  structure with the <strong>category, tag, author, or postname</strong> fields</li>
<li>Google looks at the words in the URLs of your posts and uses them as  factor in determining relevance, and therefore <strong>he (Matt) advises using  %postname% in your WordPress permalinks. </strong>He doesn’t advise using <em>ONLY</em> %postname%.   There’s nothing wrong with using postname. <strong>Just use something else at  the beginning of the string</strong>.</li>
<li>There is a LOT of benefit of having <strong>postname in url</strong> if you are using <strong>adsense</strong>. Try this: Take any new domain timbuktu.com and if you have a post for which the url is timbuktu.com?p=7 you will get junk ads.   Now try timbuktu.com/car-insurance-save-on-car-insurance &#8211; You will get beautiful insurance ads.</li>
</ul>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/2264/wp_dropdown_categories-with-taxonomies/' rel='bookmark' title='wp_dropdown_categories with taxonomies'>wp_dropdown_categories with taxonomies</a> <small>Fix - custom drop down categories with taxonomy...</small></li>
<li><a href='http://webdesign.anmari.com/2204/wordpress-installation-checklist/' rel='bookmark' title='WordPress Installation Checklist'>WordPress Installation Checklist</a> <small>Installation Cheatsheet for wp 3.0 up.  WordPress has improved so much, many of the checklists on the web include unnecessary...</small></li>
<li><a href='http://webdesign.anmari.com/1649/shortcode-any-widget/' rel='bookmark' title='Shortcode a widget in a page or post'>Shortcode a widget in a page or post</a> <small>Shortcodize a widget - Use any widget in a shortcode in a page or post...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2336/permalinks-custom-post-types-and-taxonomies-conflicts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plugin does not have valid header.. still activates</title>
		<link>http://webdesign.anmari.com/2312/activation-error-plugin-does-not-have-valid-header-still-activates/</link>
		<comments>http://webdesign.anmari.com/2312/activation-error-plugin-does-not-have-valid-header-still-activates/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 06:57:41 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2312</guid>
		<description><![CDATA[Wordpress invalid plugin header problems when activating uploaded zip files
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/2490/debug-a-wordpress-plugin-or-theme-for-non-devleopers/' rel='bookmark' title='Debug a wordpress plugin or theme &#8211; for non-developers'>Debug a wordpress plugin or theme &#8211; for non-developers</a> <small>For non-developers - how to debug a plugin or theme, or at least provide some better information about why it...</small></li>
<li><a href='http://webdesign.anmari.com/822/moving-wordpress/' rel='bookmark' title='Moving wordpress'>Moving wordpress</a> <small>Step by Step Guide to Moving the wordpress admin code and optionally relocating your content directory. This facilitates sharing of...</small></li>
<li><a href='http://webdesign.anmari.com/2572/how-to-give-your-plugin-pluggable-functions/' rel='bookmark' title='How to give your plugin pluggable functions'>How to give your plugin pluggable functions</a> <small>How to give your plugin pluggable functions and how to override a pluggable function by defining your own....</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you experiencing problems installing a plugin from a zip file, do not panic, do not curse the developer!</p>
<p>Google <a href="http://www.google.com/search?q=The+plugin+does+not+have+a+valid+header">The+plugin+does+not+have+a+valid+header</a> and you will find a lot, most of them will tell you that</p>
<ol>
<li> Mostly it is the folder structure which suits ftp&#8217;ers but does not suit zip installers</li>
<li>sometimes  there is a minor problem in the plugin header</li>
<li>sometimes  it is a bug in the way that the zip installer works and you will find that even though you have that invalid header message, the plugin will have activated or you will be able to activate it from the inactive plugins list</li>
</ol>
<h3>Use FTP if you can</h3>
<p>The wordpress zip install is finicky &#8211; it does not cope with certain situations that I expect it to.  If you can at all use ftp instead, please do.  Not only will you have a better view of what is going on and your websites folder structure, you will also avoid some problems.</p>
<h3>Handling a zip file &#8211; Zipped at folder or file level?</h3>
<ul>
<li>If the plugin zip file has a version number (which is a good practise so one knows which file is which, the zip installer will install it into a version folder&#8230; and NOT upgrade &#8211; you will end up with two versions.</li>
<li>Unzip or explore the zip file first &#8211; if it is all neatly in a folder, you can ftp that folder up sweetly.  Nice!</li>
<li>If you insist on using the zip install, you will have to unzip, and then rezip at the lower level, without the top folder in order to use the zip installer</li>
</ul>
<h3>Still getting an invalid header message (even in 3.0.1)?</h3>
<ul>
<li>Somehow once you have mucked around trying the zip  install with folders etc, WordPress has stored the fact that it does not like the plugin, and even if you have now ftp&#8217;ed a copy up it remembers that it had a problem.  I was getting really frustrated and had double checked my header endlessly.  Then I found this<a href="http://teachmeblogging.com/solving-the-plugin-does-not-have-a-valid-header-issue-wordpress/"> little comment</a> about<strong> ignoring the message, heading back, back, back to the plugin list. </strong></li>
<li> Go to<strong> inactive plugins</strong>, refresh if you have to, activate.</li>
<li>In one instance, after being told there was an invalid header and not being to see it in the inactive list, I found that it had activated after all.</li>
</ul>
<p>I have had an attempt at describing what seems to be the cause possible corrective action.  See</p>
<p><a href="http://core.trac.wordpress.org/ticket/15191">http://core.trac.wordpress.org/ticket/15191</a></p>
<p>Hope that helps!</p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/2490/debug-a-wordpress-plugin-or-theme-for-non-devleopers/' rel='bookmark' title='Debug a wordpress plugin or theme &#8211; for non-developers'>Debug a wordpress plugin or theme &#8211; for non-developers</a> <small>For non-developers - how to debug a plugin or theme, or at least provide some better information about why it...</small></li>
<li><a href='http://webdesign.anmari.com/822/moving-wordpress/' rel='bookmark' title='Moving wordpress'>Moving wordpress</a> <small>Step by Step Guide to Moving the wordpress admin code and optionally relocating your content directory. This facilitates sharing of...</small></li>
<li><a href='http://webdesign.anmari.com/2572/how-to-give-your-plugin-pluggable-functions/' rel='bookmark' title='How to give your plugin pluggable functions'>How to give your plugin pluggable functions</a> <small>How to give your plugin pluggable functions and how to override a pluggable function by defining your own....</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2312/activation-error-plugin-does-not-have-valid-header-still-activates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make wp-cron show times in your wordpress timezone</title>
		<link>http://webdesign.anmari.com/2279/make-wp-cron-show-times-in-your-wordpress-timezone/</link>
		<comments>http://webdesign.anmari.com/2279/make-wp-cron-show-times-in-your-wordpress-timezone/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 03:40:40 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2279</guid>
		<description><![CDATA[wp-cron-dashboard by the prolific wokamoto (OKAMOTO Wataru) is a very simple but useful little plugin &#8211; saves having write your own bit of code  for background jobs. If you&#8217;d like it to show times in your wordpress site timezone, here is a modified version.    Oh &#8211; just realised &#8211; if you are still using the [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/520/timezones-and-offsets-in-wordpress/' rel='bookmark' title='Timezones and offsets in wordpress'>Timezones and offsets in wordpress</a> <small>Writing a plugin that requires a correct timezone object ?  Not sure how to deal with wordpress installations that may...</small></li>
<li><a href='http://webdesign.anmari.com/336/timezones-wordpress-ical-php/' rel='bookmark' title='Timezones, WordPress, Ical, Php&#8230;.'>Timezones, WordPress, Ical, Php&#8230;.</a> <small>What a lot of fun this can be (not!) Your Ical file may have a timezone specified, the event may...</small></li>
<li><a href='http://webdesign.anmari.com/2204/wordpress-installation-checklist/' rel='bookmark' title='WordPress Installation Checklist'>WordPress Installation Checklist</a> <small>Installation Cheatsheet for wp 3.0 up.  WordPress has improved so much, many of the checklists on the web include unnecessary...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/extend/plugins/wp-cron-dashboard/">wp-cron-dashboard</a> by the prolific <a href="http://profiles.wordpress.org/users/wokamoto/">wokamoto </a>(<a title="dogmap.jp" href="http://dogmap.jp/">OKAMOTO Wataru</a>) is a very simple but useful little plugin &#8211; saves having write your own bit of code  for background jobs.</p>
<p>If you&#8217;d like it to show times in your wordpress site timezone, here is a modified version.    Oh &#8211; just realised &#8211; if you are still using the old gmt offset, please change to timezone string to use this (or add code to use offset).  Remember offset do NOT cope with daylight saving changes, so I standardise on setting the city timezone in all the webs I do.</p>
<p>Update: the zip file now also includes modificiation which checks to see if an action of the same name has been added (for developers working too late!). Remember: Cron Jobs scheduled but not executing???  You need to add the action for the cron job:</p>
<blockquote><p>add_action(&#8216;my_action&#8217;,'my_function&#8217;);</p></blockquote>
<p>Wokamoto, you are welcome to take changes and add to your plugin &#8211; It&#8217;s   only a few lines of code, but scattered through the plugin.</p>
<div id="attachment_2291" class="wp-caption aligncenter" style="width: 497px"><a href="http://webdesign.anmari.com/wp-content/uploads/cron.png"><img class="size-full wp-image-2291" title="cron" src="http://webdesign.anmari.com/wp-content/uploads/cron.png" alt="Screenshot of modified wordpress cron dashboard" width="487" height="261" /></a><p class="wp-caption-text">Screenshot of modified wordpress cron dashboard with action check</p></div>
<p></p>
<div style="text-align: center; margins: auto;"><a style="text-align: center; " class="button" href="http://webdesign.anmari.com/wp-content/uploads/wp-cron-dashboard1.zip">Download zip of modified wp-cron-dashboard</a></div>
<p></p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/520/timezones-and-offsets-in-wordpress/' rel='bookmark' title='Timezones and offsets in wordpress'>Timezones and offsets in wordpress</a> <small>Writing a plugin that requires a correct timezone object ?  Not sure how to deal with wordpress installations that may...</small></li>
<li><a href='http://webdesign.anmari.com/336/timezones-wordpress-ical-php/' rel='bookmark' title='Timezones, WordPress, Ical, Php&#8230;.'>Timezones, WordPress, Ical, Php&#8230;.</a> <small>What a lot of fun this can be (not!) Your Ical file may have a timezone specified, the event may...</small></li>
<li><a href='http://webdesign.anmari.com/2204/wordpress-installation-checklist/' rel='bookmark' title='WordPress Installation Checklist'>WordPress Installation Checklist</a> <small>Installation Cheatsheet for wp 3.0 up.  WordPress has improved so much, many of the checklists on the web include unnecessary...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2279/make-wp-cron-show-times-in-your-wordpress-timezone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>wp_dropdown_categories with taxonomies</title>
		<link>http://webdesign.anmari.com/2264/wp_dropdown_categories-with-taxonomies/</link>
		<comments>http://webdesign.anmari.com/2264/wp_dropdown_categories-with-taxonomies/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 08:08:59 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2264</guid>
		<description><![CDATA[Fix - custom drop down categories with taxonomy
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/2336/permalinks-custom-post-types-and-taxonomies-conflicts/' rel='bookmark' title='Permalinks, custom post types and taxonomies, conflicts'>Permalinks, custom post types and taxonomies, conflicts</a> <small>How to avoid clash, conflict and 404 problems with permalinks, custom post types and taxonomies....</small></li>
<li><a href='http://webdesign.anmari.com/2572/how-to-give-your-plugin-pluggable-functions/' rel='bookmark' title='How to give your plugin pluggable functions'>How to give your plugin pluggable functions</a> <small>How to give your plugin pluggable functions and how to override a pluggable function by defining your own....</small></li>
<li><a href='http://webdesign.anmari.com/2408/why-i-code-without-javascript-if-i-can/' rel='bookmark' title='Why I code without javascript if i can'>Why I code without javascript if i can</a> <small>Developing without javascript - why?...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is one for other developers.  Until <a href="http://core.trac.wordpress.org/ticket/13258">this bug 13258</a> is fixed, if you are trying to get the wordpress function <a href="http://codex.wordpress.org/Function_Reference/wp_dropdown_categories">wp_dropdown_categories() </a> to work with custom taxonomies, then you may need custom code.</p>
<p>Attached is a sample file.  The code is based on code from somewhere else, but I forget where.  I had to do even more funky things like swop the default url out for an &#8220;events&#8221; url so that the query would deliver event posts ordered by event instance date rather than published date.  See that in action at <a href="http://icalevents.com/test/">icalevents test site</a></p>
<p>I have stripped that back, so I think the attached file is all you need now.  I am using it for another private plugin which is adding filtering to the manage posts admin page and it seems to work ok.</p>
<p><a href="http://webdesign.anmari.com/wp-content/uploads/amr-custom-dropdown-taxonomy.zip">Zipped file: amr-custom-dropdown-taxonomy</a></p>
<p>Note: the taxonomy being used here is called &#8220;plugin_categories&#8221; &#8211; it NOT using categories.</p>
<p style="text-align: center;">
<div id="attachment_2266" class="wp-caption aligncenter" style="width: 622px"><a href="http://webdesign.anmari.com/wp-content/uploads/adminfilter.png"><img class="size-full wp-image-2266 " title="adminfilter" src="http://webdesign.anmari.com/wp-content/uploads/adminfilter.png" alt="" width="612" height="198" /></a><p class="wp-caption-text">Custom filter</p></div>
<div id="attachment_2267" class="wp-caption aligncenter" style="width: 600px"><a href="http://webdesign.anmari.com/wp-content/uploads/admin21.png"><img class="size-full wp-image-2267 " title="admin2" src="http://webdesign.anmari.com/wp-content/uploads/admin21.png" alt="" width="590" height="157" /></a><p class="wp-caption-text">The filtered result</p></div>
<div id="attachment_2268" class="wp-caption aligncenter" style="width: 644px"><a href="http://webdesign.anmari.com/wp-content/uploads/theurl.png"><img class="size-full wp-image-2268 " title="theurl" src="http://webdesign.anmari.com/wp-content/uploads/theurl.png" alt="" width="634" height="38" /></a><p class="wp-caption-text">the url</p></div>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/2336/permalinks-custom-post-types-and-taxonomies-conflicts/' rel='bookmark' title='Permalinks, custom post types and taxonomies, conflicts'>Permalinks, custom post types and taxonomies, conflicts</a> <small>How to avoid clash, conflict and 404 problems with permalinks, custom post types and taxonomies....</small></li>
<li><a href='http://webdesign.anmari.com/2572/how-to-give-your-plugin-pluggable-functions/' rel='bookmark' title='How to give your plugin pluggable functions'>How to give your plugin pluggable functions</a> <small>How to give your plugin pluggable functions and how to override a pluggable function by defining your own....</small></li>
<li><a href='http://webdesign.anmari.com/2408/why-i-code-without-javascript-if-i-can/' rel='bookmark' title='Why I code without javascript if i can'>Why I code without javascript if i can</a> <small>Developing without javascript - why?...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2264/wp_dropdown_categories-with-taxonomies/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

