<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>WP Doctors</title> <link>http://www.wpdoctors.co.uk</link> <description>Specialists in all things Wordpress</description> <lastBuildDate>Wed, 22 Feb 2012 09:10:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WPDoctors" /><feedburner:info uri="wpdoctors" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Snippet to make Gravity Forms Address Entry more British</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/LrMVo12pxoE/</link> <comments>http://www.wpdoctors.co.uk/snippet-to-make-gravity-forms-address-entry-more-british/#comments</comments> <pubDate>Mon, 16 Jan 2012 12:53:04 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[Gravity Forms Tips]]></category> <category><![CDATA[WordPress Tips]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=1265</guid> <description><![CDATA[<p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2012/01/UK-Union-Jack-250x187.jpg" alt="UK Union Jack" title="UK Union Jack" width="250" height="187" class="alignright size-thumbnail wp-image-1268" /></p><p><span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> is fantastic tool for collecting names, email address and postal addresses. However, GravityForms is a US plugin, so the default form labels are all US or Canada-centric. Here&#8217;s a simple tweak that you can add to <strong>functions.php</strong> to &#8230;</p>]]></description> <content:encoded><![CDATA[<p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2012/01/UK-Union-Jack-250x187.jpg" alt="UK Union Jack" title="UK Union Jack" width="250" height="187" class="alignright size-thumbnail wp-image-1268" /></p><p><span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> is fantastic tool for collecting names, email address and postal addresses. However, GravityForms is a US plugin, so the default form labels are all US or Canada-centric. Here&#8217;s a simple tweak that you can add to <strong>functions.php</strong> to make your custom address form show UK-labels for addresses.<span
id="more-1265"></span></p><p>By default, <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> will show:</p><ul><li>State / Province / Region</li><li>Zip / Postal Code</li></ul><p>Which is fine, but for UK-only websites, we&#8217;d like to be a little more British. So if you copy the following snippet of code into your template <strong>functions.php</strong>, you&#8217;ll end up with much more UK-centric labels for your address entry on your <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span>.</p><pre>/**
 * Function to make the address fields GravityForms more British.
 */
function customiseFormLabels($addressTypes, $formID)
{
	$addressTypes['international']['zip_label'] 	= 'Post Code';
	$addressTypes['international']['state_label'] 	= 'County';	

	return $addressTypes;
}

// Use this one to change all gravity address forms to be more British
add_filter('gform_address_types', 'customiseFormLabels', 10, 2);

// To only change the labels for Form ID = 2, use the following instead.
// Note that the form ID goes after gform_address_types as gform_address_types_ID
//add_filter('gform_address_types_2', 'customiseFormLabels', 10, 2);</pre><p>Instead, you&#8217;ll get the following:</p><ul><li>County</li><li>Post Code</li></ul><p>Much more British. You may now sing the National Anthem. :)</p> <img src="http://feeds.feedburner.com/~r/WPDoctors/~4/LrMVo12pxoE" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/snippet-to-make-gravity-forms-address-entry-more-british/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/snippet-to-make-gravity-forms-address-entry-more-british/</feedburner:origLink></item> <item><title>How to always have an up-to-date Footer Copyright Date</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/spUuxb2yhr0/</link> <comments>http://www.wpdoctors.co.uk/how-to-always-have-an-up-to-date-footer-copyright-date/#comments</comments> <pubDate>Wed, 04 Jan 2012 11:29:58 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[WordPress Tips]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=1218</guid> <description><![CDATA[<p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2012/01/footer.jpg" alt="" title="Footer" width="200" height="171" class="alignright size-full wp-image-1219" /></p><p>Although we&#8217;re less interested in the actual copyright for a website, correctly setting the <strong>copyright year in the footer of a web page/site</strong> is something that us web developers and webmasters are keen to do every 1st of January.</p><p>However, &#8230;</p>]]></description> <content:encoded><![CDATA[<p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2012/01/footer.jpg" alt="" title="Footer" width="200" height="171" class="alignright size-full wp-image-1219" /></p><p>Although we&#8217;re less interested in the actual copyright for a website, correctly setting the <strong>copyright year in the footer of a web page/site</strong> is something that us web developers and webmasters are keen to do every 1st of January.</p><p>However, if you have a PHP-based website (such as WordPress), then here&#8217;s a simple bit of code you can copy-n-paste to always have the right date in your website footer.<span
id="more-1218"></span></p><h3>A website started before this year</h3><p>If your website was started before the current year (e.g. 2011), then this will work perfectly. The <strong>date(&#8220;Y&#8221;)</strong> code will output the current year, so the following will show &#8220;<strong>&copy; Copyright 2011-2012</strong>&#8221; if the current year is 2012 (which it is at the time of writing).</p><pre>&amp;copy; Copyright 2011-&lt;?php echo date(&quot;Y&quot;); ?&gt;</pre><h3>A website started this year</h3><p>If you&#8217;ve started a website this year, then you clearly don&#8217;t want to show &#8220;<strong>Copyright 2012-2012</strong>&#8220;. So that&#8217;s why you can use the code below, which will automatically include subsequent years once you move into next year (so 2013 in this case).</p><pre>
&lt;?php
// Goes anywhere you like, if using WordPress, then we recommend putting it into functions.php.
function showDateRange($startYear) {
	$thisYear = date(&quot;Y&quot;);
	if ($startYear == $thisYear) {
		return $thisYear;
	}
	return sprintf(&#039;%s-%s&#039;, $startYear, $thisYear);
}
?&gt;
</pre><p>And this bit goes into footer.php if you&#8217;re using WordPress, or your main template if using any other PHP-based template.</p><pre>&amp;copy; Copyright &lt;?php echo showDateRange(&#039;2011&#039;); ?&gt;</pre><p>What you&#8217;ll get is:</p><ul><li><strong>&copy; Copyright 2011</strong> &#8211; when you&#8217;re in 2011</li><li><strong>&copy; Copyright 2011-2012</strong> &#8211; when you&#8217;re in 2012</li><li><strong>&copy; Copyright 2011-2013</strong> &#8211; when you&#8217;re in 2013, etc</li></ul><p>You&#8217;ll never need to update the footer copyright again! :)</p> <img src="http://feeds.feedburner.com/~r/WPDoctors/~4/spUuxb2yhr0" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/how-to-always-have-an-up-to-date-footer-copyright-date/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/how-to-always-have-an-up-to-date-footer-copyright-date/</feedburner:origLink></item> <item><title>8 Reasons why Gravity Forms Rocks – Plugin Review</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/2hdKWXwPpt0/</link> <comments>http://www.wpdoctors.co.uk/8-reasons-why-gravity-forms-rocks-plugin-review/#comments</comments> <pubDate>Mon, 14 Nov 2011 15:05:51 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[Gravity Forms Tips]]></category> <category><![CDATA[WordPress Plugin Reviews]]></category> <category><![CDATA[WordPress Plugin Review]]></category> <category><![CDATA[WordPress plugins]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=1106</guid> <description><![CDATA[<p><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" title="Gravity Forms Plugin for WordPress" target="_blank" rel="nofollow"><img
src="http://gravityforms.s3.amazonaws.com/banners/140x140.gif" alt="Gravity Forms Contact Form Plugin for WordPress" width="140" height="140" class="alignright" /></a></p><p>I&#8217;ve been using <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> for a long time now (roughly 2 years at the time of writing). It has become the <strong>only contact form</strong> plugin that I will use on either my own websites or on client websites.</p><p>The &#8230;</p>]]></description> <content:encoded><![CDATA[<p><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" title="Gravity Forms Plugin for WordPress" target="_blank" rel="nofollow"><img
src="http://gravityforms.s3.amazonaws.com/banners/140x140.gif" alt="Gravity Forms Contact Form Plugin for WordPress" width="140" height="140" class="alignright" /></a></p><p>I&#8217;ve been using <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> for a long time now (roughly 2 years at the time of writing). It has become the <strong>only contact form</strong> plugin that I will use on either my own websites or on client websites.</p><p>The <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> plugin is packed full of features, but this article explains the reasons why I like it. This is not really a full <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> review, more of a highlight of the aspects that make it useful to me. Hopefully this article gives you some <strong>ideas of what you can do with the plugin</strong> that you&#8217;ve not already thought of!</p><p><span
id="more-1106"></span></p><h3>1) Massive Time Savings</h3><p>Creating potentially very sophisticated forms takes a few minutes using <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span>. If you are technical, it&#8217;d take a few hours to do it properly in PHP. So using the plugin saves valuable time, and it&#8217;s less error prone.</p><h3>2) Backup Form Submissions</h3><p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/11/Spreadsheet-Icon.png" alt="" title="Spreadsheet Icon" width="128" height="128" class="alignright size-full wp-image-1122" /></p><p>When a website visitor submits a form, any successful submissions are stored in admin area. This means you can <strong>download the form submissions</strong> as a CSV (comma-separated values) file.</p><p>Once you have the CSV file, you can import the entries into a spreadsheet for doing detailed analysis. So in addition to getting a backup of all form submissions (in case you don&#8217;t receive a notification email), you can do some statistical work on submissions too.</p><h3>3) Easy-peasy Post Creation</h3><p>With the correct fields, <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> can <strong>create posts</strong> directly, including setting featured images and setting the post category. This is perfect if you have a directory-type website where each post is a profile of a person or business, and users can submit their details via a form.</p><p>If you really want to get nifty, <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> can also create <strong>Custom Post Types</strong> and work with <strong>Custom Taxonomies</strong> if you use this <a
href="http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/">free 3rd-party plugin</a>.</p><h3>4) You can accept Paypal payments</h3><p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/11/Paypal-Logo.jpg" alt="" title="Paypal Logo" width="200" height="69" class="alignleft size-full wp-image-1124" /></p><p>If you opt for the developer licence of <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span>, you also get the <strong>Paypal AddOn</strong>. The Paypal AddOn allows you to accept a payment as part of the form submission process, either like a booking form or a pseudo-shopping cart. If you have a custom booking process on your website, then <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> makes it really to accept a payment via Paypal too.</p><p>You could even use the Paypal support for a paid support request, as payment can be taken along with accepting the support question and contact details.</p><h3>5) Easy mailing list support with MailChimp</h3><p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/11/Mailchimp-Logo.jpg" alt="" title="Mailchimp Logo" width="175" height="63" class="alignright size-full wp-image-1126" /></p><p>Since <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> works nicely with MailChimp (using the <strong>MailChimp AddOn</strong> in the developer package), you can easily add mailing list subscription to any existing contact form you have. e.g. you could have a <em>&#8216;Tick here to get the newsletter&#8217;</em> on your contact form, to saving having more than one contact form.</p><p>MailChimp does require a lot of work to get a nice looking signup form. Thankfully <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> removes that headache by making it really easy to make a neat-looking contact form.</p><h3>6) Easy tweaking for non-techies</h3><p>If you&#8217;re not technical, playing with code probably causes you some headaches! But if you&#8217;re not technical, you can easily create new forms, as well as tweak existing ones.</p><p>This works great for my clients who want to be able to adjust the information they collect at a later date. This gives them the peace of mind that they have <strong>control over their own website</strong>.</p><h3>7) Easy migration of forms between websites</h3><p>Just imagine, you&#8217;ve spent a few days (or even weeks) perfecting your website form. Now you want it on another website you have? Thanks to <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span>, you can export and import any form to a new website running <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span>. Clearly this saves you plenty of time, as well as minimising any copying errors that might creep in by forgetting an important detail.</p><h3>8) Personalised email notifications</h3><p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/11/Email-Icon.png" alt="" title="Email Icon" width="128" height="128" class="alignleft size-full wp-image-1128" /></p><p>The email notifications (following a successful form submission) can be customised.</p><p>This means you can create personal acknowledgement emails to anyone who fills in one of your forms. This gives your website a <strong>more professional feel</strong>, and <strong>reassures the website visitor</strong> that their contact message was successfully received.</p><h3>The fundamental benefit?</h3><p>The overall benefit of <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> is that it saves you lots of time. If you&#8217;re not technical, then you get lots of capability for very little effort. Time is so short these days&#8230; why bother doing things the slow and painful way? Use <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> instead!</p><p>(<strong>Worthy note:</strong> No, I don&#8217;t work for Rocket Media, I&#8217;m just a <em>big</em> fan of their plugin!).</p> <img src="http://feeds.feedburner.com/~r/WPDoctors/~4/2hdKWXwPpt0" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/8-reasons-why-gravity-forms-rocks-plugin-review/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/8-reasons-why-gravity-forms-rocks-plugin-review/</feedburner:origLink></item> <item><title>How to centre a WordPress NextGEN Slideshow Gallery</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/yarNaRrzHgM/</link> <comments>http://www.wpdoctors.co.uk/how-to-centre-a-wordpress-nextgen-slideshow-gallery/#comments</comments> <pubDate>Tue, 26 Jul 2011 08:44:56 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[WordPress Fixes]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[NextGen Gallery]]></category> <category><![CDATA[WordPress plugin tweaks]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=916</guid> <description><![CDATA[<p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/07/NextGEN-Gallery-After-300x279.jpg" alt="" title="NextGEN-Gallery - Centering the Slideshow" width="300" height="279" class="aligncenter size-medium wp-image-917" /></p><p>I was approached at the weekend by one of my clients who was having trouble centering the gallery slideshow from using the <a
href="http://wordpress.org/extend/plugins/nextgen-gallery/">NextGEN Gallery WordPress Plugin</a>. For those of you who don&#8217;t know, NextGEN Gallery is a free plugin &#8230;</p>]]></description> <content:encoded><![CDATA[<p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/07/NextGEN-Gallery-After-300x279.jpg" alt="" title="NextGEN-Gallery - Centering the Slideshow" width="300" height="279" class="aligncenter size-medium wp-image-917" /></p><p>I was approached at the weekend by one of my clients who was having trouble centering the gallery slideshow from using the <a
href="http://wordpress.org/extend/plugins/nextgen-gallery/">NextGEN Gallery WordPress Plugin</a>. For those of you who don&#8217;t know, NextGEN Gallery is a free plugin that allows you to show off your photo galleries on your WordPress website. So this blog post features a very simple fix to centre the current slide on a page.<span
id="more-916"></span></p><p>Out of the box, NextGEN Gallery is very powerful, but invariably requires some CSS tweaks to get the look and feel you want. The gallery plugin is user-friendy and easy to use, making light work of uploading load of photos at once. One of the main features is an automatic slideshow that iterates through all images in a gallery (in NextGEN, a gallery is a group of photos). I won&#8217;t go through the details of uploading photos, nor how you add a slideshow to a page. I&#8217;m just going to focus on the fix that ensures the slide is centered in the page.</p><div
id="attachment_919" class="wp-caption aligncenter" style="width: 510px"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/07/NextGEN-Gallery-Before.jpg" alt="Default Alignment - to the left" title="NextGEN-Gallery---Before" width="500" height="465" class="size-full wp-image-919" /><p
class="wp-caption-text">Default Alignment - to the left</p></div><p>By default, the current photo (or slide) is aligned to the left. This is because the width of the slideshow panel is set to the width of currently shown image. So any narrow images will automatically align to the left.</p><p>The fix is this simple bit of CSS, added to the theme <tt>styles.css</tt>. The first section will set the width of the slide holder to be the width of the page container. The next section will center align all of the contents of the slide holder, i.e. the images. The final block of code removes the <tt>absolute</tt> positioning of the image (defined by an inline CSS style created by NextGEN), which allows the image elements to take notice of the margins as defined in the 2nd section.</p><pre>
/* Gallery Fixes */
.ngg-slideshow {
   width: 100% !important;
}
.ngg-slideshow * {
    margin: 0 auto !important;
}
.ngg-slideshow img {
    position: relative !important;
}
</pre><p>In some browsers, such as Chrome, I discovered that the first image wasn&#8217;t always centered. After looking at the code in Firebug, I found that the first image was set to <tt>display: inline</tt>, which would ignore the margins as defined above. Therefore defining <tt>display: block</tt> works a treat.</p><pre>
.ngg-slideshow img {
    display: block;
}
</pre><p>So the final code to achieve centering like that above is:</p><pre>
/* Gallery Fixes */
.ngg-slideshow {
   width: 100% !important;
}
.ngg-slideshow * {
    margin: 0 auto !important;
}
.ngg-slideshow img {
    position: relative !important;
    display: block;
}
</pre><div
id="attachment_917" class="wp-caption aligncenter" style="width: 510px"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/07/NextGEN-Gallery-After.jpg" alt="NextGEN-Gallery - Centering the Slideshow" title="NextGEN-Gallery - Centering the Slideshow" width="500" height="466" class="size-full wp-image-917" /><p
class="wp-caption-text">Centering the Slideshow</p></div><p>Thanks to <a
href="http://solankiphotography.co.uk/">Solanki Photography</a> for the interesting challenge!</p> <img src="http://feeds.feedburner.com/~r/WPDoctors/~4/yarNaRrzHgM" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/how-to-centre-a-wordpress-nextgen-slideshow-gallery/feed/</wfw:commentRss> <slash:comments>10</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/how-to-centre-a-wordpress-nextgen-slideshow-gallery/</feedburner:origLink></item> <item><title>8 Quick Wins to Boost the Performance of your WordPress Website</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/2xFfnnJ5Ybg/</link> <comments>http://www.wpdoctors.co.uk/8-quick-wins-to-boost-the-performance-of-your-wordpress-website/#comments</comments> <pubDate>Mon, 04 Apr 2011 11:00:21 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[WordPress Optimisation]]></category> <category><![CDATA[WordPress Themes]]></category> <category><![CDATA[WordPress Tips]]></category> <category><![CDATA[caching]]></category> <category><![CDATA[load times]]></category> <category><![CDATA[performance]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=687</guid> <description><![CDATA[Website performance tuning is a bit of an art. However, we're sharing our simple tips for getting great performance from your WordPress blog to massively reduce your page loading times. Reducing loading times can help improve search engine rankings, and improves the experience of the your website for your visitors.]]></description> <content:encoded><![CDATA[<p><img
class="alignright size-full wp-image-689" title="WordPress Performance Tuning" src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/03/performance-tuning.png" alt="WordPress Performance Tuning" width="128" height="128" /></p><p>Increasingly, I&#8217;m being asked my advice on how you can <strong>optimise your WordPress website</strong> to <strong>reduce loading times</strong>. Reducing loading times <strong>improves the user experience for your visitors</strong>, so they get to see your website more quickly. Search engines such as Google also use page loading times as a <strong>factor in their ranking algorithm</strong>. If you want great rankings, ensure your website loads quickly.</p><p>Performance tuning is a bit of an art, and you need a fair amount of technical ability to squeeze every last drop of speed from your WordPress website. Ultimately, you want to get data down the internet pipe as quickly as possible. Reducing wastage where possible is a key part of that.</p><p>There are some <strong>very quick wins</strong> you can make with just a basic technical understanding of WordPress&#8230; and I&#8217;ve compiled them into this article. You&#8217;ll notice that there is technical language in this article, and I assume some familiarity with WordPress themes, HTML and CSS.  You should get <strong>noticeable improvements in page load times just by following these tips</strong>!</p><h2 class="section">1) Minimise the number of plugins you have</h2><p>Too many plugins can slow a WordPress website down very easily.  There&#8217;s no optimal number of plugins to have installed, simply because it depends on how complex a plugin is and what your server specifications are. Based on my own personal experience, the average number of WordPress plugins installed on a website tends to be between 10 to 25.</p><ul><li><strong>If you&#8217;re not using a plugin, remove it</strong> &#8211; This is good house-keeping, and will slightly speed up the loading of the admin area of WordPress.</li><li><strong>For basic plugins, see if the functionality can be added directly to your theme</strong> &#8211; e.g. basic shortcodes and many social media plugins can often be moved to your template files by a half-decent WordPress developer. Plugins add an overhead to load times as they are initialised, so moving essential functionality to theme files removes that overhead.</li><li><strong>Use plugins that blend the functionality of several plugins</strong> &#8211; some plugins combine useful functionality into a single plugin. Again, this marginally reduces load times. e.g. <a
href="http://yoast.com/wordpress/seo/">Yoast&#8217;s WordPress SEO</a> combines XML sitemaps, SEO tweaking and navigation breadcrumbs.</li></ul><p><a
name="point2"></a></p><h2 class="section">2) Remove embedded stylesheets from your header</h2><p>There are some WordPress plugins and themes that are badly implemented, storing cascading style sheet (CSS) information in the header of the web page.</p><pre>
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;This is the page title&lt;/title&gt;
        &lt;style=&quot;text/css&quot;&gt;
         h1 {font-size: 150%; color: red; }
         h2 {font-size: 120%; color: blue; }
         p {font-size: 100%; color: black; }
        &lt;/style&gt;
    &lt;/head&gt;
</pre><h3>Why it&#8217;s bad&#8230;</h3><p>Say you had 5kb of CSS information in the header area. That&#8217;s 5kb being added to <strong>every single web page</strong> the user visits. Now 5kb doesn&#8217;t sound like a lot, but it still adds crucial miliseconds to the page loading time.</p><p>So if a website visitor views 5 pages, they download the same CSS data 5 times. Since the CSS data is 5kb, then the user downloads a total of 25kb of CSS data (5x 5kb) to view 5 web pages.</p><h3>How to fix it&#8230;</h3><p>If that CSS was stored in an external CSS file, rather than embedded in the header, then the website visitor only downloads that CSS information <strong>once</strong>, as it&#8217;s stored in the web browser&#8217;s cache. Any subsequent page that&#8217;s loaded just references the external CSS file, and still benefits from the style information in that file.</p><h4>The HTML</h4><pre>
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;This is the page title&lt;/title&gt;
        &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;
    &lt;/head&gt;
</pre><h4>The CSS (which goes in a CSS file, e.g. styles.css for your WordPress theme)</h4><pre>
h1 {
    font-size: 150%;
    color: red;
}
h2 {
    font-size: 120%;
    color: blue;
}
p {
    font-size: 100%;
    color: black;
}
</pre><p>Now if the website visitor views 5 pages, they download the CSS data on the first visit. The CSS data is stored as an external file in the browser cache, and it&#8217;s then referenced 4 times on the subsequent page views. Since the CSS data is 5kb, then the user downloads a total of 5kb of CSS data. So on 5 web page views, <strong>you save them 20kb of waste.</strong></p><h2 class="section">3) Remove inline style information from HTML</h2><p>This mostly affects WordPress themes, it&#8217;s where style information is embedded with the HTML. It&#8217;s called <strong>inline CSS</strong>. It looks like this:</p><pre>
&lt;table style=&quot;padding: 3px 5px; border: 1px solid #CDD;&quot;&gt;
    &lt;tr&gt;
        &lt;td style=&quot;background: red; color: #FFF&quot;&gt;Error&lt;/td&gt;
        &lt;td style=&quot;background: red; color: #FFF&quot;&gt;This is the error message&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</pre><h3>Why it&#8217;s bad&#8230;</h3><p>As with <a
href="#point2">point 2) above</a>, with header CSS, having lots of style information in the HTML also slows down the page loading time. If you have exactly the same style information on several pages, then you have considerable waste. It also makes the style harder to adjust in the future (e.g. colour changes), as the CSS is spread out over many different pages.</p><h3>How to fix it&#8230;</h3><p>You should use CSS correctly, and give HTML elements a CSS class or ID, so that you can reference them in a CSS file. As in <a
href="#point2">point 2) above</a>, the CSS information is then loaded just once, which is much faster for your website visitors. So split the HTML and CSS into 2 places:</p><h4>The HTML</h4><pre>
&lt;table class=&quot;error-table&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;Error&lt;/td&gt;
        &lt;td&gt;This is the error message&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</pre><h4>The CSS (which goes in a CSS file, e.g. styles.css for your WordPress theme)</h4><pre>
.error-table {
   padding: 3px 5px;
   border: 1px solid #CDD;
}
.error-table td {
   background: red;
   color: #FFF
}
</pre><h2 class="section">4) Compact your images</h2><p>Most images are <strong>not stored in the most efficient way</strong> when you save them in a graphics package. You can get some great savings on page load times if you use an image compacting tool.</p><p>There&#8217;s a great tool from Yahoo called <a
href="http://www.smushit.com/ysmush.it/">Smush.it</a>, which will remove all of the unnecessary data from an image file, without damaging the quality of the image. It&#8217;s a <strong>lossless size-reduction tool</strong> (I&#8217;m intentionally not using the word &#8220;Compression&#8221;), so you don&#8217;t need to worry about your images looking blocky or distorted.</p><p>The Smush.it tool <strong>preserves folder locations</strong> too. So if you point the tool at a website, it will resize the images and provide a zip file for you to download. When you extract the zip file, you can just upload the complete file structure to overwrite your existing images with their smaller counterparts.</p><p>There&#8217;s also a <a
href="http://wordpress.org/extend/plugins/wp-smushit/">Smush.it WordPress plugin</a>, which will compact your images as you upload them via the Media Uploader.</p><p>You can <strong>save hundreds of kilobytes</strong> by compacting your images, so this represents <strong>one of the biggest savings you can make</strong> in reducing waste data, and therefore one of the <strong>most effective performance tweaks</strong> you can do.</p><h2 class="section">5) Use WP Minify to compact your CSS and Scripts</h2><p>Usually, CSS and Javascript files contain lots of <strong>comments  and white-space</strong> (e.g spaces and blank lines). From a developer&#8217;s point of view, those comments and white-space make maintenance considerably easier, as the code is easier to navigate. However, your website users aren&#8217;t going to be doing anything with your website source code, so those extra white-space characters and comments are <strong>pure wastage</strong>.</p><div
id="attachment_724" class="wp-caption aligncenter" style="width: 560px"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/04/WP-Minify-Before-minification.png" alt="WP Minify - Before minification" title="WP Minify - Before minification" width="550" height="196" class="size-full wp-image-724" /><p
class="wp-caption-text">WP Minify - Before minification</p></div><p>Therefore I recommend using a plugin such as <a
href="http://wordpress.org/extend/plugins/wp-minify/">WP Minify</a>, which will compact all of your stylesheets and scripts automatically. You&#8217;ll typically achieve a 30% to 60% reduction in script sizes as a direct result.</p><div
id="attachment_722" class="wp-caption aligncenter" style="width: 518px"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/04/WP-Minify-After-minification.png" alt="WP Minify - After minification" title="WP Minify - After minification" width="508" height="102" class="size-full wp-image-722" /><p
class="wp-caption-text">WP Minify - After minification</p></div><p><strong>For Developers:</strong> The reason why I suggest using this plugin rather than compacting scripts before uploading them to the website, is so that the Minify engine can work its magic on scripts and stylesheets that you haven&#8217;t developed. e.g. Scripts from 3rd party plugins. Spending your time compacting those scripts each time a user updates a plugin is possible but impractical if you&#8217;re as busy as I am! So <a
href="http://wordpress.org/extend/plugins/wp-minify/">WP Minify</a> gives you quick results with the least fuss.</p><h2 class="section">6) Using WordPress caching plugins</h2><p>Using plugins that cache your website files and database queries can considerably improve your loading times. You can shave valuable seconds off each page load simply by configuring your caching plugin correctly.</p><p>If you&#8217;re not that technical, then <a
href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a> will give you great results, just by selecting all of the <strong>Recommended</strong> options. If you&#8217;re more technically inclined, then you definitely need to spend time with <a
href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache</a>. Mastering W3 Total Cache takes a long time, but as you do, you&#8217;ll find your websites perform very well indeed.</p><h2 class="section">7) Enable gzip Compression Mode</h2><p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/04/gzip.png" alt="gzip" title="gzip" width="96" height="124" class="alignright size-full wp-image-733" /></p><p>The above caching plugins have a gzip compression mode, which will compress all of the data sent from your server to your visitor&#8217;s web browser. The compression is done on-the-fly, and can easily reduce page load times by as much as 50% yet again. It&#8217;s a bit like automatically sending someone a zip file of your website each time they visit a new web page.</p><p>Using gzip mode can have a dramatic effect on page load times, but beware, some servers don&#8217;t properly support gzip. When that&#8217;s the case, your visitors just see garbled data. So just make sure you test your website in the major web browsers to make sure all is well.</p><h2 class="section">8) Have a Facebook Fan Box? Cache it!</h2><p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/04/Facebook-Like-Box.png" alt="Facebook Like Box" title="Facebook Like Box" width="175" height="214" class="alignright size-full wp-image-729" /></p><p>If you have a <a
href="http://developers.facebook.com/docs/reference/plugins/like-box/">Facebook Like/Fan Box</a>, you&#8217;ll notice that it does take a little while to load.  However, Facebook fan boxes are great for getting valuable traffic from Facebook, so they are worth having.</p><p>I&#8217;ve been having great results with the <a
href="http://wordpress.org/extend/plugins/facebook-fan-box-cache/">Facebook Fan Box Cache</a> plugin. The widget massively reduces the number of HTTP requests, making your website finish loading much sooner. You will need to add your own CSS to make it look good, but I find that the improvements in loading times are worth it.</p><div
class="clear"></div><h2 class="section">Conclusion</h2><p>So there you go, 8 quick wins to improve the performance of your WordPress website. Although some of the tips require some technical ability, they are pretty easy to implement, which is why I justify them as being quick ;) !</p><p>In an age of impatient visitors, you want your website to load within 2-3 seconds. Just remember, shaving off milliseconds and kilobytes from different areas of your website will add up to reductions of several seconds in overall page load times. Using a plugin such as <a
href="https://addons.mozilla.org/en-US/firefox/addon/yslow/">YSlow for Firefox</a> will help you diagnose where your performance problems are.</p><p>I wish you good luck with your tuning adventures! Please do share your own tips for WordPress performance tweaking in the comments area below.</p> <img src="http://feeds.feedburner.com/~r/WPDoctors/~4/2xFfnnJ5Ybg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/8-quick-wins-to-boost-the-performance-of-your-wordpress-website/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/8-quick-wins-to-boost-the-performance-of-your-wordpress-website/</feedburner:origLink></item> <item><title>5 WordPress Themes Designed for Video Blogs</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/r7WMXvD7k2k/</link> <comments>http://www.wpdoctors.co.uk/5-video-blog-themes-for-wordpress/#comments</comments> <pubDate>Tue, 08 Mar 2011 13:40:14 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[WordPress Questions]]></category> <category><![CDATA[WordPress Themes]]></category> <category><![CDATA[themes]]></category> <category><![CDATA[video blogging]]></category> <category><![CDATA[YouTube]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=667</guid> <description><![CDATA[This blog post answers a question I received by email yesterday from Shahid. Would like to run a video-blog, and wants to know the best WordPress theme to use.]]></description> <content:encoded><![CDATA[<p>This blog post answers a question I received by email yesterday from Shahid. Would like to run a video-blog, and wants to know the best WordPress theme to use.<br
/> <span
id="more-667"></span></p><h3>The Question</h3><blockquote><p>Hello WP Doctors! Can you help and advise me?</p><p>I am looking at the possibility of starting a local community website in my area. WordPress comes up trumps as the ideal ‘platform’ to start my website. Initial local feedback from residents in my area; indicate to me that people would like to watch video blogs on the site regarding local issues and concerns.</p><p>Can we have a WordPress based theme where the emphasis is on ‘video blogs’? The theme must be ‘user friendly’ so idiots like me can maintain it. The videos will be uploaded to Youtube and should be easily linked to the Website.</p></blockquote><h3>The Answer</h3><p>Hi Shahid, there are lots of WordPress themes for creating video blogs. Increasingly, I recommend using a Premium WordPress Theme for new websites, as they are typically better designed and more robust. I&#8217;ve found 5 WordPress themes that are designed for Video Blogs that may interest you. There are plenty more themes out there, but these will get you started.</p><p>Generally I recommend <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/woothemes" rel="nofollow" target="_blank">WooThemes</a></span> WordPress themes over themes from <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/themeforest" rel="nofollow" target="_blank">ThemeForest</a></span>, as typically you get a better quality and easier-to-use theme from <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/woothemes" rel="nofollow" target="_blank">WooThemes</a></span>. I&#8217;ve provided some suggestions from both providers to give you some ideas.</p><p>I hope that helps?</p><h3>1) Groovy Video from <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/woothemes" rel="nofollow" target="_blank">WooThemes</a></span></h3><p><a
href="http://www.wpdoctors.co.uk/recommends/woothemes-groovyvideo"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/03/WordPress-Video-Blog-Theme-Groovy-Video.jpg" alt="WordPress Video Blog Theme - Groovy Video" title="WordPress Video Blog Theme - Groovy Video" width="600" height="420" class="aligncenter size-full wp-image-672" /></a></p><h3>2) MyStream from <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/woothemes" rel="nofollow" target="_blank">WooThemes</a></span></h3><p><a
href="http://www.wpdoctors.co.uk/recommends/woothemes-mystream"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/03/WordPress-Video-Blog-Theme-MyStream.jpg" alt="WordPress Video Blog Theme - MyStream" title="WordPress Video Blog Theme - MyStream" width="600" height="429" class="aligncenter size-full wp-image-674" /></a></p><h3>3) Wave from <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/themeforest" rel="nofollow" target="_blank">ThemeForest</a></span></h3><p><a
href="http://www.wpdoctors.co.uk/recommends/themeforest-wave"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/03/WordPress-Video-Blog-Theme-Wave.jpg" alt="WordPress Video Blog Theme - Wave" title="WordPress Video Blog Theme - Wave" width="600" height="429" class="aligncenter size-full wp-image-676" /></a></p><h3>4) wpShow from <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/themeforest" rel="nofollow" target="_blank">ThemeForest</a></span></h3><p><a
href="http://www.wpdoctors.co.uk/recommends/themeforest-wpshow"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/03/WordPress-Video-Blog-Theme-wpShow.jpg" alt="WordPress Video Blog Theme - wpShow" title="WordPress Video Blog Theme - wpShow" width="500" height="357" class="aligncenter size-full wp-image-677" /></a></p><h3>5) MyVideoBlog from <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/themeforest" rel="nofollow" target="_blank">ThemeForest</a></span></h3><p><a
href="http://www.wpdoctors.co.uk/recommends/themeforest-myvideoblog"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2011/03/WordPress-Video-Blog-Theme-MyVideoBlog.jpg" alt="WordPress Video Blog Theme - MyVideoBlog" title="WordPress Video Blog Theme - MyVideoBlog" width="600" height="634" class="aligncenter size-full wp-image-678" /></a></p> <img src="http://feeds.feedburner.com/~r/WPDoctors/~4/r7WMXvD7k2k" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/5-video-blog-themes-for-wordpress/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/5-video-blog-themes-for-wordpress/</feedburner:origLink></item> <item><title>Adding a touch of Snow to your WordPress website</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/2p35Uvcdoc4/</link> <comments>http://www.wpdoctors.co.uk/adding-a-touch-of-snow-to-your-wordpress-website/#comments</comments> <pubDate>Fri, 10 Dec 2010 16:39:12 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[A Bit of Fun]]></category> <category><![CDATA[WordPress Plugins]]></category> <category><![CDATA[WordPress Tips]]></category> <category><![CDATA[plugins]]></category> <category><![CDATA[Snow]]></category> <category><![CDATA[WordPress plugins]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=456</guid> <description><![CDATA[<p><a
href="http://www.zath.co.uk"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2010/12/Zath-Christmas-Logo.png" alt="" title="Zath Christmas Logo" width="313" height="204" class="alignright size-full wp-image-459" /></a></p><p>Given that Christmas is just 2 weeks away, it&#8217;s no surprise to see a few websites having a Christmas theme. In fact, some websites even have full-on Christmas logos, just like the UK gadget website <a
href="http://www.zath.co.uk.">Zath</a>.</p><p>However, if you &#8230;</p>]]></description> <content:encoded><![CDATA[<p><a
href="http://www.zath.co.uk"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2010/12/Zath-Christmas-Logo.png" alt="" title="Zath Christmas Logo" width="313" height="204" class="alignright size-full wp-image-459" /></a></p><p>Given that Christmas is just 2 weeks away, it&#8217;s no surprise to see a few websites having a Christmas theme. In fact, some websites even have full-on Christmas logos, just like the UK gadget website <a
href="http://www.zath.co.uk.">Zath</a>.</p><p>However, if you don&#8217;t have the time or money to get a Christmassy logo designed, then you can really easily add snow to your WordPress website with a plugin. Sure, there&#8217;s a bit of a performance hit, but it is a bit of fun!<span
id="more-456"></span></p><p>The WordPress Directory is filled with <a
href="http://wordpress.org/extend/plugins/tags/snow">animated snow plugins</a>, so it&#8217;s worth trying a few to see what works for you.</p><div
id="attachment_463" class="wp-caption aligncenter" style="width: 542px"><a
href="http://www.gifts4men.com"><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2010/12/Snow-on-Gifts-for-Men.png" alt="" title="Snow on Gifts4Men" width="532" height="284" class="size-full wp-image-463" /></a><p
class="wp-caption-text">Showing the Animated Snow on Gifts4Men</p></div><p>&nbsp;</p><p> I congratulate the following websites who have added snow to their websites for Christmas this year:</p><ul><li><a
href="http://www.gifts4men.com/">Gifts4Men</a> &#8211; Gifts and gadgets that blokes will love.</li><li><a
href="http://www.netcodes.co.uk/">NetCodes</a> &#8211; A voucher code website.</li><li><a
href="http://www.sioptytawe.co.uk/">Siop Ty Tawe</a> &#8211; A Welsh gift shop.</li><li><a
href="http://www.pcchecker.co.uk/">PC Checker</a> &#8211; Top Laptop and PC deals.</li><li><a
href="http://confidentfactor.com/">Confident Factor</a> &#8211; Professional and business coaching.</li><li><a
href="http://www.caketins.org.uk/">Cake Tins</a> &#8211; Funky cookware for making cakes in pretty much every shape you can think of.</li></ul><p>And if you&#8217;re reading this article in July, these websites have probably disabled the plugin by now. Probably.</p><p>Have you done anything Christmassy on your website? If so, please me know in the comments!</p> <img src="http://feeds.feedburner.com/~r/WPDoctors/~4/2p35Uvcdoc4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/adding-a-touch-of-snow-to-your-wordpress-website/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/adding-a-touch-of-snow-to-your-wordpress-website/</feedburner:origLink></item> <item><title>WP Portfolio – An Easy CSS Grid Layout</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/x2dL_9vTCM8/</link> <comments>http://www.wpdoctors.co.uk/wp-portfolio-an-easy-css-grid-layout/#comments</comments> <pubDate>Fri, 10 Dec 2010 15:56:33 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[Our Plugins]]></category> <category><![CDATA[WordPress Tips]]></category> <category><![CDATA[CSS Layout]]></category> <category><![CDATA[Wordpress Plugin]]></category> <category><![CDATA[WP Portfolio]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=441</guid> <description><![CDATA[<p>One of the frequent questions that I get asked is how to create a grid layout for our <span
class='bm_keywordlink'><a
href="http://www.wpdoctors.co.uk/our-wordpress-plugins/wp-portfolio/">WordPress Portfolio Plugin</a></span>. It&#8217;s actually pretty simple, as you just need to use floats to shift the websites around. So to &#8230;</p>]]></description> <content:encoded><![CDATA[<p>One of the frequent questions that I get asked is how to create a grid layout for our <span
class='bm_keywordlink'><a
href="http://www.wpdoctors.co.uk/our-wordpress-plugins/wp-portfolio/">WordPress Portfolio Plugin</a></span>. It&#8217;s actually pretty simple, as you just need to use floats to shift the websites around. So to make things really easy, here&#8217;s a copy&#8217;n'paste example for doing a grid layout. <span
id="more-441"></span></p><p>To see what we&#8217;re trying to achieve, this is a live example of the grid system working.</p><div
id="portfolio-grid"><h2>Grid Demo</h2><p>A collection of websites for the grid demo.</p><div
class="portfolio-website"><div
class="website-thumbnail"><a
href="http://news.bbc.co.uk" target="_blank"><img
src="http://www.wpdoctors.co.uk/wp-content/plugins/wp-portfolio/cache//776c0a67517655924fe95e3c21159e89_a4e18727d27e26433034b4c78f1037a5.jpg" alt="BBC News"/></a></div><div
class="website-name"><a
href="http://news.bbc.co.uk" target="_blank">BBC News</a></div><div
class="website-url"><a
href="http://news.bbc.co.uk" target="_blank">http://news.bbc.co.uk</a></div><div
class="website-description">A popular destination for up-to-date news in the UK and around the World.</div><div
class="website-clear"></div></div><div
class="portfolio-website"><div
class="website-thumbnail"><a
href="http://www.envirogadget.com" target="_blank"><img
src="http://www.wpdoctors.co.uk/wp-content/plugins/wp-portfolio/cache//6f90d0f07b7a936cf1ec6079a6688e14_a4e18727d27e26433034b4c78f1037a5.jpg" alt="EnviroGadget"/></a></div><div
class="website-name"><a
href="http://www.envirogadget.com" target="_blank">EnviroGadget</a></div><div
class="website-url"><a
href="http://www.envirogadget.com" target="_blank">http://www.envirogadget.com</a></div><div
class="website-description">One of Dan's websites focusing on the best of eco-friendly gadgets.</div><div
class="website-clear"></div></div><div
class="portfolio-website"><div
class="website-thumbnail"><a
href="http://www.google.co.uk" target="_blank"><img
src="http://www.wpdoctors.co.uk/wp-content/plugins/wp-portfolio/cache//d5d4cf8ec8dc8fddc90b7024afa3ddb3_a4e18727d27e26433034b4c78f1037a5.jpg" alt="Google"/></a></div><div
class="website-name"><a
href="http://www.google.co.uk" target="_blank">Google</a></div><div
class="website-url"><a
href="http://www.google.co.uk" target="_blank">http://www.google.co.uk</a></div><div
class="website-description">The search engine that most people use.</div><div
class="website-clear"></div></div><div
class="portfolio-website"><div
class="website-thumbnail"><a
href="http://www.smashingmagazine.com" target="_blank"><img
src="http://www.wpdoctors.co.uk/wp-content/plugins/wp-portfolio/cache//798006956aef805e94f456054321408e_a4e18727d27e26433034b4c78f1037a5.jpg" alt="Smashing Magazine"/></a></div><div
class="website-name"><a
href="http://www.smashingmagazine.com" target="_blank">Smashing Magazine</a></div><div
class="website-url"><a
href="http://www.smashingmagazine.com" target="_blank">http://www.smashingmagazine.com</a></div><div
class="website-description">One of the most interesting design-based websites on the web.</div><div
class="website-clear"></div></div><div
class="portfolio-website"><div
class="website-thumbnail"><a
href="http://www.wordpress.org" target="_blank"><img
src="http://www.wpdoctors.co.uk/wp-content/plugins/wp-portfolio/cache//e000c69c0f9dbaf4478b15a4608b7ec4_a4e18727d27e26433034b4c78f1037a5.jpg" alt="Wordpress"/></a></div><div
class="website-name"><a
href="http://www.wordpress.org" target="_blank">Wordpress</a></div><div
class="website-url"><a
href="http://www.wordpress.org" target="_blank">http://www.wordpress.org</a></div><div
class="website-description">A slightly famous place to download a user-friendly content management tool for websites.</div><div
class="website-clear"></div></div><div
class="portfolio-website"><div
class="website-thumbnail"><a
href="http://www.wpdoctors.co.uk" target="_blank"><img
src="http://www.wpdoctors.co.uk/wp-content/plugins/wp-portfolio/cache//efa79870f869219b4ad3f5ceebdf9fc7_a4e18727d27e26433034b4c78f1037a5.jpg" alt="WP Doctors"/></a></div><div
class="website-name"><a
href="http://www.wpdoctors.co.uk" target="_blank">WP Doctors</a></div><div
class="website-url"><a
href="http://www.wpdoctors.co.uk" target="_blank">http://www.wpdoctors.co.uk</a></div><div
class="website-description">Our very own website, where you can find info on our WordPress development services.</div><div
class="website-clear"></div></div><div
class="footer">&nbsp;</div></div><h3>The portfolio shortcode and HTML</h3><p>The HTML/shortcode you need to paste into a page or post to achieve the above layout is simply this:</p><pre>
&lt;div id=&quot;portfolio-grid&quot;&gt;
[wp-portfolio groups=&quot;1&quot;]
&lt;div class=&quot;footer&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;
</pre><h3>The portfolio shortcode and HTML</h3><p>The CSS you need to give the grid layout (which can be pasted into the <strong><em>Template CSS</em></strong> section in <strong><em>Layout Settings</em></strong> in the plugin settings, or into your template&#8217;s <strong><em>styles.css</em></strong>) is below.</p><pre>
/* Grid Example */
#portfolio-grid .portfolio-website {
    width: 150px;
    float: left;
    height: 245px;
    border: 1px solid #BAD4E3;
    background: #E3EAF2;
    text-align: center;
    margin: 3px;
}
#portfolio-grid .website-description {
    text-align: left;
}
#portfolio-grid .website-name {
    font-size: 10pt;
}
#portfolio-grid .website-url {
    display: none;
}
#portfolio-grid .website-thumbnail {
    float: none;
    text-align: center;
    margin: 3px auto 10px;
}
#portfolio-grid .footer {
    clear: both;
}</pre><p>The bits that make it work are the width of each portfolio item, the floating left, and the fixed height. All the other styles can be adjusted to suit your website.</p><p>Enjoy!<br
/> Dan</p> <img src="http://feeds.feedburner.com/~r/WPDoctors/~4/x2dL_9vTCM8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/wp-portfolio-an-easy-css-grid-layout/feed/</wfw:commentRss> <slash:comments>3</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/wp-portfolio-an-easy-css-grid-layout/</feedburner:origLink></item> <item><title>Adding an Email Address confirmation field in Gravity Forms</title><link>http://feedproxy.google.com/~r/WPDoctors/~3/jNsxTvI6al4/</link> <comments>http://www.wpdoctors.co.uk/adding-an-email-address-confirmation-field-in-gravity-forms/#comments</comments> <pubDate>Wed, 17 Nov 2010 12:06:12 +0000</pubDate> <dc:creator>Dan Harrison</dc:creator> <category><![CDATA[Gravity Forms Tips]]></category> <category><![CDATA[WordPress Tips]]></category> <category><![CDATA[custom filters]]></category> <category><![CDATA[newsletters]]></category> <category><![CDATA[signup forms]]></category><guid isPermaLink="false">http://www.wpdoctors.co.uk/?p=405</guid> <description><![CDATA[<p>I&#8217;m a massive fan of <strong><span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span></strong>, as it saves me considerable time with creating pretty complex contact forms. Most recently, I needed to create a contact form for a client where visitors are requested to <em>enter their email </em>&#8230;</p>]]></description> <content:encoded><![CDATA[<p>I&#8217;m a massive fan of <strong><span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span></strong>, as it saves me considerable time with creating pretty complex contact forms. Most recently, I needed to create a contact form for a client where visitors are requested to <em>enter their email address</em>, <em>confirm their email address</em> and <em>then enter their name</em>. Once submitting the form, the users details are added to MailChimp using Gravity Form&#8217;s <strong>MailChimp Add On</strong>.</p><p>The motivation for adding an email address confirmation field was to <strong>help avoid visitors typing in the wrong email address</strong>, and therefore ensuring as many people as possible correctly sign up to the newsletter.</p><div
class="woo-sc-box alert  rounded "><strong>Update:</strong> Thanks to Mistry, I can now confirm that as of <strong>V1.50</strong>, <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> natively supports email field confirmation. Just look for the <strong>&#8220;Enable Email Confirmation&#8221;</strong> when adding an email field. So the following code is not necessary.</div><p><img
src="http://cdn.wpdoctors.co.uk/wp-content/uploads/2010/11/Newsletter-Email-Confirmation.png" alt="Newsletter - Email Confirmation" title="Newsletter - Email Confirmation" width="303" height="262" class="aligncenter size-full wp-image-428" /></p><p>Since <span
class='bm_keywordlink_affiliate'><a
href="http://www.wpdoctors.co.uk/recommends/gravityforms" rel="nofollow" target="_blank">Gravity Forms</a></span> <strong>does not currently natively support comparing values between fields</strong>, I needed to add my own custom hook to compare and validate the email address fields. <span
id="more-405"></span></p><h3>The Solution</h3><p>First I check that I&#8217;m <strong>validating the correct form</strong>, as it&#8217;s pretty common for me to have more than one form per website.</p><p>Once the form has been validated, I check that the email address fields match (note that I&#8217;ve needed to hardcode <strong>absolute field names</strong> to refer to the two email address fields). The comparison is performed using a <strong>case insensitive search</strong>, just so that a minor difference in email address due to a capital letter is ignored.</p><p>If the fields are found to not match, the form is invalidated, and the 2nd email address field is marked as invalid with an appropriate error message. This approach works perfectly with AJAX-based forms too.</p><p>I hope that you find it useful!</p><pre>
/**
 * Custom validation for gravity forms that will validate
 * the 2nd email address field for a form that has an
 * email address field, and a 'confirm your email address'
 * field as the first 2 fields in a form.
 *
 * @author Dan Harrison (http://www.wpdoctors.co.uk)
 */
function custom_validation($validation_result)
{
    // Extract the form from the validation result
    $form = $validation_result["form"];

    // Ensure we only validate the form entitled
    // 'Newsletter Signup' otherwise return the
    // result of the validation that's already been
    // determined (i.e.
    if ($form['title'] != 'Newsletter Signup') {
        return $validation_result;
    }    

    // We want to ensure that the 1st and 2nd fields
    // match, as it's an email confirmation box
    // First field (0 index) is the email address field
    // Second field (1 index) is the field to confirm
    //  the email address

    // Get the values from $_POST to do the
    // comparison (watch the input numbers, as
    // they're not 0-indexed as above).
    // First field = $_POST['input_2']
    // Second field = $_POST['input_3']

    // Email addresses match (case insensitive, but
    //  use strcmp for case-sensitive comparison)
    if (strcasecmp($_POST['input_2'], $_POST['input_3']) == 0)
    {
        // Nothing to do, fields already match
    }

    // Email addresses don't match.
    else
    {
        // We're doing our own validation now, so
        // override the validation for the whole form.
        // Setting the default to false.
        $validation_result["is_valid"] = false;

        // Invalidate the 2nd email address
        $form["fields"][1]["failed_validation"] = true;
        $form["fields"][1]["validation_message"] =
                   "The email addresses do not match. ".
                   "Please check your email address is correct in both boxes.";
    }

    // Update the form in the validation result
    // with the form object we've modified
    $validation_result["form"] = $form;

    // Return the validation result to
    // continue the action.
    return $validation_result;
}
add_filter('gform_validation', 'custom_validation');
</pre><img src="http://feeds.feedburner.com/~r/WPDoctors/~4/jNsxTvI6al4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://www.wpdoctors.co.uk/adding-an-email-address-confirmation-field-in-gravity-forms/feed/</wfw:commentRss> <slash:comments>13</slash:comments> <feedburner:origLink>http://www.wpdoctors.co.uk/adding-an-email-address-confirmation-field-in-gravity-forms/</feedburner:origLink></item> </channel> </rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic
Database Caching using disk: basic
Object Caching 1339/1423 objects using disk: basic
Content Delivery Network via cdn.wpdoctors.co.uk

Served from: www.wpdoctors.co.uk @ 2012-02-22 09:57:04 -->

