<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Paulund</title><link>http://www.paulund.co.uk</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Paulundcouk" /><description>Feed of the post from my blog about web development. This will have all the information I find useful or new web apps I create.</description><language>en</language><lastBuildDate>Thu, 24 May 2012 22:43:17 PDT</lastBuildDate><generator>http://wordpress.org/?v=3.3.2</generator><sy:updatePeriod xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">hourly</sy:updatePeriod><sy:updateFrequency xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">1</sy:updateFrequency><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Paulundcouk" /><feedburner:info uri="paulundcouk" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Paulundcouk</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><title>Create Cron Jobs In WordPress</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/-Owat9kT1QQ/create-cron-jobs-in-wordpress</link><category>Wordpress</category><category>cron</category><category>function</category><category>schedule</category><category>task</category><category>Time</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Thu, 24 May 2012 20:47:10 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5484</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p><img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/1335691021_alarmd.png" alt="1335691021_alarmd" title="1335691021_alarmd" width="128" height="128" class="aligncenter size-full wp-image-5747" /></p><p>A cron job allows you to automatically set a function to run at a set time or interval. WordPress comes with an in-built function <code>wp_schedule_event()</code>.</p><h2>WordPress Schedule Event</h2><p>The function <a href="http://codex.wordpress.org/Function_Reference/wp_schedule_event" title="Wordpress schedule event">wp_schedule_event()</a> allows you schedule a hook to run an action to schedule a function to run at a set interval.</p><pre>
&lt;?php wp_schedule_event($timestamp, $recurrence, $hook, $args); ?&gt;
</pre><p><span id="more-5484"></span></p><h2>Schedule An Hourly Event In Plugin</h2><p>To schedule an hourly event within a plugin you will schedule a function on activation of the plugin.</p><pre>
register_activation_hook(__FILE__, 'my_activation');
add_action('my_hourly_event', 'do_this_hourly');

function my_activation() {
	wp_schedule_event( current_time( 'timestamp' ), 'hourly', 'my_hourly_event');
}

function do_this_hourly() {
	// do something every hour
}
</pre><p>If you want to deactivate the schedule event then use this.</p><pre>
register_deactivation_hook(__FILE__, 'my_deactivation');

function my_deactivation() {
	wp_clear_scheduled_hook('my_hourly_event');
}
</pre><h2>Schedule hourly Event In Functions.php</h2><p>This doesn&#8217;t rely on activation of the plugin as it will run inside the functions.php file.</p><pre>
add_action('my_hourly_event', 'do_this_hourly');

function my_activation() {
	if ( !wp_next_scheduled( 'my_hourly_event' ) ) {
		wp_schedule_event( current_time( 'timestamp' ), 'hourly', 'my_hourly_event');
	}
}
add_action('wp', 'my_activation');

function do_this_hourly() {
	// do something every hour
}
</pre><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=-Owat9kT1QQ:0eiDyMhfwX8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=-Owat9kT1QQ:0eiDyMhfwX8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=-Owat9kT1QQ:0eiDyMhfwX8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=-Owat9kT1QQ:0eiDyMhfwX8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=-Owat9kT1QQ:0eiDyMhfwX8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=-Owat9kT1QQ:0eiDyMhfwX8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=-Owat9kT1QQ:0eiDyMhfwX8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=-Owat9kT1QQ:0eiDyMhfwX8:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=-Owat9kT1QQ:0eiDyMhfwX8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=-Owat9kT1QQ:0eiDyMhfwX8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/-Owat9kT1QQ" height="1" width="1"/>]]></content:encoded><description>A cron job allows you to automatically set a function to run at a set time or interval. WordPress comes with an in-built function wp_schedule_event(). WordPress Schedule Event The function wp_schedule_event() allows you schedule a hook to run an action to schedule a function to run at a set interval. &amp;#60;?php wp_schedule_event($timestamp, $recurrence, $hook, $args); [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/create-cron-jobs-in-wordpress/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.paulund.co.uk/create-cron-jobs-in-wordpress</feedburner:origLink></item><item><title>Create Always On Page HTML Elements</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/LkicfKdB6F8/create-always-on-page-html-elements</link><category>jQuery</category><category>github</category><category>in</category><category>keep</category><category>Plugin</category><category>view</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Thu, 24 May 2012 12:52:06 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5386</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>A comment trend in web design now is to make sure important content is always on screen by making the content move as you scroll down the page.</p><p>Many websites can do this with any bit of information they want, some use it for the top navigation, some use this feature to display <a href="http://www.paulund.co.uk/how-to-create-fixed-position-share-box" title="How To Create Fixed Position Share Box">social media button</a>, some use it to make sure their mail list subscription box in view all the time.</p><h2>Hongkiat Website</h2><p>The web design website <a href="http://www.hongkiat.com/blog/" title="Hongkiat">Hongkiat</a> uses this functionality to always keep the logo, social media share buttons and a search box in view to the visitor. This allows the visitor to always be able to share the current page where ever they are on page. They have the website logo which is a link back to the home page and the search box allows the visitor to always have access to search for a subject anywhere on the page.</p><p>The below image is the standard top navigation.<br /> <img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/hongkiat-top-nav-590x77.png" alt="hongkiat-top-nav" title="hongkiat-top-nav" width="590" height="77" class="aligncenter size-large wp-image-5389" /><br /> <span id="more-5386"></span><br /> When you scroll the navigation bar changes to this.<br /> <img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/hongkiat-scroll-nav-590x29.png" alt="hongkiat-scroll-nav" title="hongkiat-scroll-nav" width="590" height="29" class="aligncenter size-large wp-image-5390" /></p><h2>Premium Pixels Love It Button</h2><p><img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/pp-love-it.png" alt="pp-love-it" title="pp-love-it" width="234" height="168" class="aligncenter size-full wp-image-5392" /></p><p><a href="http://www.premiumpixels.com/" title="Premium Pixels">Premium pixels</a> is a free PSD resource by Orman Clark a graphic designer from UK. Orman makes quality PSDs and gives them away for free on his website premium pixel. On this site he allows people to vote to say if they like the PSD he is offering, by clicking on the love it button.</p><p>Premium pixels uses this same always in view functionality on the love it button. As you scroll down the page the love it button will always stay at the top of the screen.</p><h2>Always In View Social Buttons</h2><p>When talking about always in view elements you have to talk about social media buttons. Almost every site now has floating social media buttons which will always be in view as you scroll down the screen. They will appear just to the left of the content, this means that people can always share the current page on their favourite social media network anywhere on the page.</p><p>For this functionality you can use the WordPress plugin Digg Digg.</p><p><img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/diggdigg-590x194.png" alt="diggdigg" title="diggdigg" width="590" height="194" class="aligncenter size-large wp-image-5393" /></p><p>With Digg Digg by Buffer, you have an all in one social sharing plugin for your blog. Display all social sharing buttons nicely on your blog and make it look amazing.</p><p>You can download this for free by going to WordPress.org.</p><p><a href="http://wordpress.org/extend/plugins/digg-digg/" class="button">Digg Digg</a></p><h2>Keep In View.js</h2><p>I stumbled across this Github project called <strong>keep-in-view.js</strong> which uses a small bit of Javascript to make sure an element is always on the screen.</p><p>Keep in view will make sure the elements don&#8217;t scroll off the page by making them stick to the top or the bottom of the page.</p><p>View the project on Github.</p><p><a href="https://github.com/dutchcelt/Keep-in-View" class="button">Keep in View</a></p><p>In this tutorial we are going to build a small page which will use keep in view to make sure that the navigation bar is  always on the screen.</p><h3>Using Keep In View</h3><p>To use <strong>keepInView</strong> it&#8217;s very simple all you have to do is download the project and include this on the page. But you must make sure that you also include jQuery on the page or it will not work correctly.</p><p>After these are included on the page then it&#8217;s very easy to make any element on the page sticky and always in view.</p><p>All you have to do is use the function <strong>keepInView</strong> on a element.</p><pre>
$("nav").keepInView();
</pre><p>This will make sure that that the element in the nav tag is always in view on the page.</p><p>The <strong>keepInView</strong> function has a number of optional parameters you can use to customise the sticky element.</p><ul><li><strong>Fixed</strong> &#8211; Boolean false by default. When set to true this element will be fixed regardless of the scrolling position.</li><li><strong>edgeOffset</strong> &#8211; 0 by default. This will by the offset to both the top or the bottom.</li><li><strong>zIndex</strong> &#8211; 1 by default. Will override the CSS zindex setting on this element.</li></ul><h2>Demo Keep In View</h2><p>In this demo were going to create a simple web page with navigation at the top of the page, this navigation is going to be fixed to top of the page using the keep in view plugin. We are going to create dummy content to make sure that the page is long enough so you can scroll down the page and see the navigation stick to the top of the page.</p><p>We are also going to add a subscribe box in a sidebar which we are going to use <strong>keepInView.js</strong> to make sure that the subscribe box is always on the screen.</p><h3>The HTML</h3><pre>
&lt;article class=&quot;content&quot;&gt;
        &lt;h1&gt;Too much text&lt;/h1&gt;
        &lt;img src=&quot;images/Sticky Notes.jpg&quot; class=&quot;stickyImages&quot; /&gt;
        &lt;p&gt;&lt;strong&gt;Resize and scroll the window so that you can see the script keeping elements in view.&lt;/strong&gt;&lt;/p&gt;
        &lt;h4&gt;JavaScript init:&lt;/h4&gt;
        &lt;code&gt;&lt;pre&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
    $(document).ready(function(){
        $(&quot;.help&quot;).keepInView({fixed:true, zindex: 42, edgeOffset: 30});
        $(&quot;nav, footer p&quot;).keepInView();
    });
&amp;lt;/script&amp;gt;
                &lt;/pre&gt;&lt;/code&gt;

        &lt;h2 class=sticky&gt;Sticky Header&lt;/h2&gt;
        &lt;p&gt;Trigger the &#039;unstick&#039; event on the element you no longer want to keep in view.&lt;/p&gt;

        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;h2&gt;And it just keeps on going&lt;/h2&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;h3&gt;&hellip; and going and going&lt;/h3&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
    &lt;/article&gt;

    &lt;aside&gt;
    	&lt;div class=&quot;subscribe-box&quot;&gt;
    		&lt;h3&gt;Subscribe to stay updated&lt;/h3&gt;
    		&lt;p&gt;&lt;input type=email placeholder=Enter email address /&gt;&lt;/p&gt;
    		&lt;p&gt;&lt;input type=submit value=Subscribe /&gt;&lt;/p&gt;
    	&lt;/div&gt;

    &lt;/aside&gt;

        &lt;div style=&quot;clear: both; &quot;&gt;&lt;/div&gt;
</pre><h2>Add The Javascript</h2><p>Keep in view is a jQuery plugin so we need to add both this plugin and jquery to your page.</p><p>Save the Keep in view project in the same directory as your project and add the following to the head section of your page.</p><pre>
&lt;head&gt;
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;keepinview.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
</pre><p>With these added to the page we can now use the plugin to keep certain HTML elements in view, add the following Javascript to the page to keep the navigation and subscribe box in view on the page.</p><pre>
&lt;script&gt;
$(document).ready(function(){
        // Keep the navigation in view
	$(&quot;nav&quot;).keepInView();

        // Make sure the stick header is always in view with an offset of 40 pixels from the top
	$(&quot;.sticky&quot;).keepInView({edgeOffset:40});

        // Keep the subscribe box in view 80 pixels from the top with a zIndex of 20
	$(&quot;.subscribe-box&quot;).keepInView({edgeOffset:80, zIndex:20});
});
&lt;/script&gt;
</pre><p>View the demo page with the elements on the page.</p><p><a href="http://www.paulund.co.uk/playground/demo/keep_in_view_navigation/" class="button">Demo</a></p><p>It&#8217;s that simple to keep any element on the page in view to your visitors. If you have any important elements you want to keep in view on your web page then you should try using the <strong>keepInView.js</strong>, which you can download from Github.</p><p><a href="https://github.com/dutchcelt/Keep-in-View" class="button">Download</a></p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=LkicfKdB6F8:P1hnSgHSjAo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=LkicfKdB6F8:P1hnSgHSjAo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=LkicfKdB6F8:P1hnSgHSjAo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=LkicfKdB6F8:P1hnSgHSjAo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=LkicfKdB6F8:P1hnSgHSjAo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=LkicfKdB6F8:P1hnSgHSjAo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=LkicfKdB6F8:P1hnSgHSjAo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=LkicfKdB6F8:P1hnSgHSjAo:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=LkicfKdB6F8:P1hnSgHSjAo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=LkicfKdB6F8:P1hnSgHSjAo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/LkicfKdB6F8" height="1" width="1"/>]]></content:encoded><description>A comment trend in web design now is to make sure important content is always on screen by making the content move as you scroll down the page. Many websites can do this with any bit of information they want, some use it for the top navigation, some use this feature to display social media [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/create-always-on-page-html-elements/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.paulund.co.uk/create-always-on-page-html-elements</feedburner:origLink></item><item><title>Automatically Set Post Featured Image</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/O09meYGWIxA/automatically-set-post-featured-image</link><category>Wordpress</category><category>featured</category><category>Image</category><category>Post</category><category>snippet</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Mon, 21 May 2012 20:47:04 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5486</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>A post featured image was introduced in WordPress version 2.9, it is a thumbnail that can be set to the post as a featured image of your post. It will not be displayed on the page but it&#8217;s up to the WordPress theme to decide when to display it.</p><h2>Enable Theme Support For Featured Post</h2><p>By default themes do not support this feature you need to add some code to the functiona.php file.</p><pre>
add_theme_support( 'post-thumbnails' );
</pre><p><span id="more-5486"></span></p><h2>Set Featured Image</h2><p>There is a meta box on the post screen where you can set an image to be the featured image on the post.</p><p><img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/featured_post.png" alt="featured_post" title="featured_post" width="288" height="86" class="aligncenter size-full wp-image-5720" /></p><h2>Automatically Set Featured Image</h2><p>But if you forget to place a featured image on your post then your theme won&#8217;t be able to display an image. Here is a snippet which will automatically set the first image from the post to be your featured image.</p><pre>
&lt;?php
function autoset_featured() {
          global $post;
          $already_has_thumb = has_post_thumbnail($post-&gt;ID);
              if (!$already_has_thumb)  {
              $attached_image = get_children( &quot;post_parent=$post-&gt;ID&amp;post_type=attachment&amp;post_mime_type=image&amp;numberposts=1&quot; );
                          if ($attached_image) {
                                foreach ($attached_image as $attachment_id =&gt; $attachment) {
                                set_post_thumbnail($post-&gt;ID, $attachment_id);
                                }
                           }
                        }
      }
add_action(&#039;the_post&#039;, &#039;autoset_featured&#039;);
add_action(&#039;save_post&#039;, &#039;autoset_featured&#039;);
add_action(&#039;draft_to_publish&#039;, &#039;autoset_featured&#039;);
add_action(&#039;new_to_publish&#039;, &#039;autoset_featured&#039;);
add_action(&#039;pending_to_publish&#039;, &#039;autoset_featured&#039;);
add_action(&#039;future_to_publish&#039;, &#039;autoset_featured&#039;);
?&gt;
</pre><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O09meYGWIxA:Acb_YsJOe4A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O09meYGWIxA:Acb_YsJOe4A:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O09meYGWIxA:Acb_YsJOe4A:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=O09meYGWIxA:Acb_YsJOe4A:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O09meYGWIxA:Acb_YsJOe4A:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=O09meYGWIxA:Acb_YsJOe4A:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O09meYGWIxA:Acb_YsJOe4A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O09meYGWIxA:Acb_YsJOe4A:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O09meYGWIxA:Acb_YsJOe4A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=O09meYGWIxA:Acb_YsJOe4A:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/O09meYGWIxA" height="1" width="1"/>]]></content:encoded><description>A post featured image was introduced in WordPress version 2.9, it is a thumbnail that can be set to the post as a featured image of your post. It will not be displayed on the page but it&amp;#8217;s up to the WordPress theme to decide when to display it. Enable Theme Support For Featured Post [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/automatically-set-post-featured-image/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">2</slash:comments><feedburner:origLink>http://www.paulund.co.uk/automatically-set-post-featured-image</feedburner:origLink></item><item><title>CSS Animate Effects We Can Learn From Animate.css</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/B_qY0_P2zLY/css-animate-effects-we-can-learn-from-animate-css</link><category>CSS</category><category>Animation</category><category>bounce</category><category>Effects</category><category>fade</category><category>flip</category><category>hinge</category><category>in</category><category>out</category><category>swing</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Sun, 20 May 2012 20:29:56 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5365</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p><img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/animate-css-590x215.png" alt="animate-css" title="animate-css" width="590" height="215" class="aligncenter size-large wp-image-5372" /><br /> In this tutorial we going to look into the <strong>open source project</strong> which has become very popular lately&#8230;<strong>Animate.css</strong>. This is a project which is currently hosted on <strong>Github</strong> where you can download the source. We are going to look at some of the best <strong>CSS animation effects</strong> out of the 53 CSS Animation effects you can get with this project.</p><h2>Animate.css</h2><p>The animate.css project can be downloaded from github.</p><p><a href="https://github.com/daneden/animate.css" class="button">Download Animate.css</a><br /> <span id="more-5365"></span></p><p>You can view the demo of Animate.css here.</p><p><a href="http://daneden.me/animate/" class="button">Animate.css Demo</a></p><p>Below are the following effects you get with animate.css and the CSS it takes to create the effect.</p><h2>CSS Flash Animation</h2><p>The flash effect will show and hide the element by using the opacity property.</p><pre>
@-webkit-keyframes flash {
	0%, 50%, 100% {opacity: 1;}
	25%, 75% {opacity: 0;}
}

@-moz-keyframes flash {
	0%, 50%, 100% {opacity: 1;}
	25%, 75% {opacity: 0;}
}

@-ms-keyframes flash {
	0%, 50%, 100% {opacity: 1;}
	25%, 75% {opacity: 0;}
}

@-o-keyframes flash {
	0%, 50%, 100% {opacity: 1;}
	25%, 75% {opacity: 0;}
}

@keyframes flash {
	0%, 50%, 100% {opacity: 1;}
	25%, 75% {opacity: 0;}
}

.flash {
	-webkit-animation-name: flash 1s;
	-moz-animation-name: flash 1s;
	-ms-animation-name: flash 1s;
	-o-animation-name: flash 1s;
	animation-name: flash 1s;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#flash" class="button" target="_blank">Demo CSS Flash</a></p><h2>CSS Shake Animation</h2><p>This effect will create a shake effect by moving the element from left to right.</p><pre>
@-webkit-keyframes shake {
	0%, 100% {-webkit-transform: translateX(0);}
	10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);}
	20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);}
}

@-moz-keyframes shake {
	0%, 100% {-moz-transform: translateX(0);}
	10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);}
	20%, 40%, 60%, 80% {-moz-transform: translateX(10px);}
}

@-ms-keyframes shake {
	0%, 100% {-ms-transform: translateX(0);}
	10%, 30%, 50%, 70%, 90% {-ms-transform: translateX(-10px);}
	20%, 40%, 60%, 80% {-ms-transform: translateX(10px);}
}

@-o-keyframes shake {
	0%, 100% {-o-transform: translateX(0);}
	10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);}
	20%, 40%, 60%, 80% {-o-transform: translateX(10px);}
}

@keyframes shake {
	0%, 100% {transform: translateX(0);}
	10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);}
	20%, 40%, 60%, 80% {transform: translateX(10px);}
}

.shake {
	-webkit-animation-name: shake;
	-moz-animation-name: shake;
	-ms-animation-name: shake;
	-o-animation-name: shake;
	animation-name: shake;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#shake" class="button" target="_blank">Demo CSS Shake</a></p><h2>CSS Bounce Animation</h2><p>This effect will make the HTML element bounce.</p><pre>
@-webkit-keyframes bounce {
	0%, 20%, 50%, 80%, 100% {-webkit-transform: translateY(0);}
	40% {-webkit-transform: translateY(-30px);}
	60% {-webkit-transform: translateY(-15px);}
}

@-moz-keyframes bounce {
	0%, 20%, 50%, 80%, 100% {-moz-transform: translateY(0);}
	40% {-moz-transform: translateY(-30px);}
	60% {-moz-transform: translateY(-15px);}
}

@-ms-keyframes bounce {
	0%, 20%, 50%, 80%, 100% {-ms-transform: translateY(0);}
	40% {-ms-transform: translateY(-30px);}
	60% {-ms-transform: translateY(-15px);}
}

@-o-keyframes bounce {
	0%, 20%, 50%, 80%, 100% {-o-transform: translateY(0);}
	40% {-o-transform: translateY(-30px);}
	60% {-o-transform: translateY(-15px);}
}
@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
	40% {transform: translateY(-30px);}
	60% {transform: translateY(-15px);}
}

.bounce {
	-webkit-animation-name: bounce;
	-moz-animation-name: bounce;
	-ms-animation-name: bounce;
	-o-animation-name: bounce;
	animation-name: bounce;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#bounce" class="button" target="_blank">Demo CSS Bounce</a></p><h2>CSS Swing Animation</h2><p>Make the element swing from left to right.</p><pre>
@-webkit-keyframes swing {
	20%, 40%, 60%, 80%, 100% { -webkit-transform-origin: top center; }
	20% { -webkit-transform: rotate(15deg); }
	40% { -webkit-transform: rotate(-10deg); }
	60% { -webkit-transform: rotate(5deg); }
	80% { -webkit-transform: rotate(-5deg); }
	100% { -webkit-transform: rotate(0deg); }
}

@-moz-keyframes swing {
	20% { -moz-transform: rotate(15deg); }
	40% { -moz-transform: rotate(-10deg); }
	60% { -moz-transform: rotate(5deg); }
	80% { -moz-transform: rotate(-5deg); }
	100% { -moz-transform: rotate(0deg); }
}

@-ms-keyframes swing {
	20% { -ms-transform: rotate(15deg); }
	40% { -ms-transform: rotate(-10deg); }
	60% { -ms-transform: rotate(5deg); }
	80% { -ms-transform: rotate(-5deg); }
	100% { -ms-transform: rotate(0deg); }
}

@-o-keyframes swing {
	20% { -o-transform: rotate(15deg); }
	40% { -o-transform: rotate(-10deg); }
	60% { -o-transform: rotate(5deg); }
	80% { -o-transform: rotate(-5deg); }
	100% { -o-transform: rotate(0deg); }
}

@keyframes swing {
	20% { transform: rotate(15deg); }
	40% { transform: rotate(-10deg); }
	60% { transform: rotate(5deg); }
	80% { transform: rotate(-5deg); }
	100% { transform: rotate(0deg); }
}

.swing {
	-webkit-transform-origin: top center;
	-moz-transform-origin: top center;
	-ms-transform-origin: top center;
	-o-transform-origin: top center;
	transform-origin: top center;
	-webkit-animation-name: swing;
	-moz-animation-name: swing;
	-ms-animation-name: swing;
	-o-animation-name: swing;
	animation-name: swing;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#swing" class="button" target="_blank">Demo CSS Swing</a></p><h2>CSS Wobble Animation</h2><p>Make the HTML element wobble with CSS animation.</p><pre>
@-webkit-keyframes wobble {
  0% { -webkit-transform: translateX(0%); }
  15% { -webkit-transform: translateX(-25%) rotate(-5deg); }
  30% { -webkit-transform: translateX(20%) rotate(3deg); }
  45% { -webkit-transform: translateX(-15%) rotate(-3deg); }
  60% { -webkit-transform: translateX(10%) rotate(2deg); }
  75% { -webkit-transform: translateX(-5%) rotate(-1deg); }
  100% { -webkit-transform: translateX(0%); }
}

@-moz-keyframes wobble {
  0% { -moz-transform: translateX(0%); }
  15% { -moz-transform: translateX(-25%) rotate(-5deg); }
  30% { -moz-transform: translateX(20%) rotate(3deg); }
  45% { -moz-transform: translateX(-15%) rotate(-3deg); }
  60% { -moz-transform: translateX(10%) rotate(2deg); }
  75% { -moz-transform: translateX(-5%) rotate(-1deg); }
  100% { -moz-transform: translateX(0%); }
}

@-ms-keyframes wobble {
  0% { -ms-transform: translateX(0%); }
  15% { -ms-transform: translateX(-25%) rotate(-5deg); }
  30% { -ms-transform: translateX(20%) rotate(3deg); }
  45% { -ms-transform: translateX(-15%) rotate(-3deg); }
  60% { -ms-transform: translateX(10%) rotate(2deg); }
  75% { -ms-transform: translateX(-5%) rotate(-1deg); }
  100% { -ms-transform: translateX(0%); }
}

@-o-keyframes wobble {
  0% { -o-transform: translateX(0%); }
  15% { -o-transform: translateX(-25%) rotate(-5deg); }
  30% { -o-transform: translateX(20%) rotate(3deg); }
  45% { -o-transform: translateX(-15%) rotate(-3deg); }
  60% { -o-transform: translateX(10%) rotate(2deg); }
  75% { -o-transform: translateX(-5%) rotate(-1deg); }
  100% { -o-transform: translateX(0%); }
}

@keyframes wobble {
  0% { transform: translateX(0%); }
  15% { transform: translateX(-25%) rotate(-5deg); }
  30% { transform: translateX(20%) rotate(3deg); }
  45% { transform: translateX(-15%) rotate(-3deg); }
  60% { transform: translateX(10%) rotate(2deg); }
  75% { transform: translateX(-5%) rotate(-1deg); }
  100% { transform: translateX(0%); }
}

.wobble {
	-webkit-animation-name: wobble;
	-moz-animation-name: wobble;
	-ms-animation-name: wobble;
	-o-animation-name: wobble;
	animation-name: wobble;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#wobble" class="button" target="_blank">Demo CSS Wobble</a></p><h2>CSS Pulse Animation</h2><p>Creates a pulse effect on the HTML element.</p><pre>
@-webkit-keyframes pulse {
    0% { -webkit-transform: scale(1); }
	50% { -webkit-transform: scale(1.1); }
    100% { -webkit-transform: scale(1); }
}
@-moz-keyframes pulse {
    0% { -moz-transform: scale(1); }
	50% { -moz-transform: scale(1.1); }
    100% { -moz-transform: scale(1); }
}
@-ms-keyframes pulse {
    0% { -ms-transform: scale(1); }
	50% { -ms-transform: scale(1.1); }
    100% { -ms-transform: scale(1); }
}
@-o-keyframes pulse {
    0% { -o-transform: scale(1); }
	50% { -o-transform: scale(1.1); }
    100% { -o-transform: scale(1); }
}
@keyframes pulse {
    0% { transform: scale(1); }
	50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse {
	-webkit-animation-name: pulse;
	-moz-animation-name: pulse;
	-ms-animation-name: pulse;
	-o-animation-name: pulse;
	animation-name: pulse;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#pulse" class="button" target="_blank">Demo CSS Pulse</a></p><h2>CSS Flip Animation</h2><p>Makes the HTML element flip, will use 3D transforms so will only work in the latest browsers.</p><pre>
@-webkit-keyframes flip {
	0% {
		-webkit-transform: perspective(400px) rotateY(0);
		-webkit-animation-timing-function: ease-out;
	}
	40% {
		-webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg);
		-webkit-animation-timing-function: ease-out;
	}
	50% {
		-webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
		-webkit-animation-timing-function: ease-in;
	}
	80% {
		-webkit-transform: perspective(400px) rotateY(360deg) scale(.95);
		-webkit-animation-timing-function: ease-in;
	}
	100% {
		-webkit-transform: perspective(400px) scale(1);
		-webkit-animation-timing-function: ease-in;
	}
}
@-moz-keyframes flip {
	0% {
		-moz-transform: perspective(400px) rotateY(0);
		-moz-animation-timing-function: ease-out;
	}
	40% {
		-moz-transform: perspective(400px) translateZ(150px) rotateY(170deg);
		-moz-animation-timing-function: ease-out;
	}
	50% {
		-moz-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
		-moz-animation-timing-function: ease-in;
	}
	80% {
		-moz-transform: perspective(400px) rotateY(360deg) scale(.95);
		-moz-animation-timing-function: ease-in;
	}
	100% {
		-moz-transform: perspective(400px) scale(1);
		-moz-animation-timing-function: ease-in;
	}
}
@-ms-keyframes flip {
	0% {
		-ms-transform: perspective(400px) rotateY(0);
		-ms-animation-timing-function: ease-out;
	}
	40% {
		-ms-transform: perspective(400px) translateZ(150px) rotateY(170deg);
		-ms-animation-timing-function: ease-out;
	}
	50% {
		-ms-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
		-ms-animation-timing-function: ease-in;
	}
	80% {
		-ms-transform: perspective(400px) rotateY(360deg) scale(.95);
		-ms-animation-timing-function: ease-in;
	}
	100% {
		-ms-transform: perspective(400px) scale(1);
		-ms-animation-timing-function: ease-in;
	}
}
@-o-keyframes flip {
	0% {
		-o-transform: perspective(400px) rotateY(0);
		-o-animation-timing-function: ease-out;
	}
	40% {
		-o-transform: perspective(400px) translateZ(150px) rotateY(170deg);
		-o-animation-timing-function: ease-out;
	}
	50% {
		-o-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
		-o-animation-timing-function: ease-in;
	}
	80% {
		-o-transform: perspective(400px) rotateY(360deg) scale(.95);
		-o-animation-timing-function: ease-in;
	}
	100% {
		-o-transform: perspective(400px) scale(1);
		-o-animation-timing-function: ease-in;
	}
}
@keyframes flip {
	0% {
		transform: perspective(400px) rotateY(0);
		animation-timing-function: ease-out;
	}
	40% {
		transform: perspective(400px) translateZ(150px) rotateY(170deg);
		animation-timing-function: ease-out;
	}
	50% {
		transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
		animation-timing-function: ease-in;
	}
	80% {
		transform: perspective(400px) rotateY(360deg) scale(.95);
		animation-timing-function: ease-in;
	}
	100% {
		transform: perspective(400px) scale(1);
		animation-timing-function: ease-in;
	}
}

.flip {
	-webkit-backface-visibility: visible !important;
	-webkit-animation-name: flip;
	-moz-backface-visibility: visible !important;
	-moz-animation-name: flip;
	-ms-backface-visibility: visible !important;
	-ms-animation-name: flip;
	-o-backface-visibility: visible !important;
	-o-animation-name: flip;
	backface-visibility: visible !important;
	animation-name: flip;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#flip" class="button" target="_blank">Demo CSS Flip</a></p><h2>CSS Fade In Down Animation</h2><p>Make the HTML element fade down with this CSS animation.</p><pre>
@-webkit-keyframes fadeInDown {
	0% {
		opacity: 0;
		-webkit-transform: translateY(-20px);
	}

	100% {
		opacity: 1;
		-webkit-transform: translateY(0);
	}
}

@-moz-keyframes fadeInDown {
	0% {
		opacity: 0;
		-moz-transform: translateY(-20px);
	}

	100% {
		opacity: 1;
		-moz-transform: translateY(0);
	}
}

@-ms-keyframes fadeInDown {
	0% {
		opacity: 0;
		-ms-transform: translateY(-20px);
	}

	100% {
		opacity: 1;
		-ms-transform: translateY(0);
	}
}

@-o-keyframes fadeInDown {
	0% {
		opacity: 0;
		-ms-transform: translateY(-20px);
	}

	100% {
		opacity: 1;
		-ms-transform: translateY(0);
	}
}

@keyframes fadeInDown {
	0% {
		opacity: 0;
		transform: translateY(-20px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

.fadeInDown {
	-webkit-animation-name: fadeInDown;
	-moz-animation-name: fadeInDown;
	-ms-animation-name: fadeInDown;
	-o-animation-name: fadeInDown;
	animation-name: fadeInDown;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#fadeindown" class="button" target="_blank">Demo CSS Fade In Down</a></p><h2>CSS Fade In Left Animation</h2><p>Makes the HTML element fade in from the left.</p><pre>
@-webkit-keyframes fadeInLeft {
	0% {
		opacity: 0;
		-webkit-transform: translateX(-20px);
	}

	100% {
		opacity: 1;
		-webkit-transform: translateX(0);
	}
}

@-moz-keyframes fadeInLeft {
	0% {
		opacity: 0;
		-moz-transform: translateX(-20px);
	}

	100% {
		opacity: 1;
		-moz-transform: translateX(0);
	}
}

@-ms-keyframes fadeInLeft {
	0% {
		opacity: 0;
		-ms-transform: translateX(-20px);
	}

	100% {
		opacity: 1;
		-ms-transform: translateX(0);
	}
}

@-o-keyframes fadeInLeft {
	0% {
		opacity: 0;
		-o-transform: translateX(-20px);
	}

	100% {
		opacity: 1;
		-o-transform: translateX(0);
	}
}

@keyframes fadeInLeft {
	0% {
		opacity: 0;
		transform: translateX(-20px);
	}

	100% {
		opacity: 1;
		transform: translateX(0);
	}
}

.fadeInLeft {
	-webkit-animation-name: fadeInLeft;
	-moz-animation-name: fadeInLeft;
	-ms-animation-name: fadeInLeft;
	-o-animation-name: fadeInLeft;
	animation-name: fadeInLeft;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#fadeinleft" class="button" target="_blank">Demo CSS Fade In Left</a></p><h2>CSS Fade In Down Big Animation</h2><p>This is similar to the fade in down animation, but it will fade the element in from the top of the page.</p><pre>
@-webkit-keyframes fadeInDownBig {
	0% {
		opacity: 0;
		-webkit-transform: translateY(-2000px);
	}

	100% {
		opacity: 1;
		-webkit-transform: translateY(0);
	}
}

@-moz-keyframes fadeInDownBig {
	0% {
		opacity: 0;
		-moz-transform: translateY(-2000px);
	}

	100% {
		opacity: 1;
		-moz-transform: translateY(0);
	}
}

@-ms-keyframes fadeInDownBig {
	0% {
		opacity: 0;
		-ms-transform: translateY(-2000px);
	}

	100% {
		opacity: 1;
		-ms-transform: translateY(0);
	}
}

@-o-keyframes fadeInDownBig {
	0% {
		opacity: 0;
		-o-transform: translateY(-2000px);
	}

	100% {
		opacity: 1;
		-o-transform: translateY(0);
	}
}

@keyframes fadeInDownBig {
	0% {
		opacity: 0;
		transform: translateY(-2000px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

.fadeInDownBig {
	-webkit-animation-name: fadeInDownBig;
	-moz-animation-name: fadeInDownBig;
	-ms-animation-name: fadeInDownBig;
	-o-animation-name: fadeInDownBig;
	animation-name: fadeInDownBig;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#fadeindownbig" class="button" target="_blank">Demo CSS Fade In Down Big</a></p><h2>CSS Fade In Left Big Animation</h2><p>Makes the element fade in from the left of the page into the middle of the page.</p><pre>
@-webkit-keyframes fadeInLeftBig {
	0% {
		opacity: 0;
		-webkit-transform: translateX(-2000px);
	}

	100% {
		opacity: 1;
		-webkit-transform: translateX(0);
	}
}
@-moz-keyframes fadeInLeftBig {
	0% {
		opacity: 0;
		-moz-transform: translateX(-2000px);
	}

	100% {
		opacity: 1;
		-moz-transform: translateX(0);
	}
}
@-ms-keyframes fadeInLeftBig {
	0% {
		opacity: 0;
		-ms-transform: translateX(-2000px);
	}

	100% {
		opacity: 1;
		-ms-transform: translateX(0);
	}
}
@-o-keyframes fadeInLeftBig {
	0% {
		opacity: 0;
		-o-transform: translateX(-2000px);
	}

	100% {
		opacity: 1;
		-o-transform: translateX(0);
	}
}
@keyframes fadeInLeftBig {
	0% {
		opacity: 0;
		transform: translateX(-2000px);
	}

	100% {
		opacity: 1;
		transform: translateX(0);
	}
}

.fadeInLeftBig {
	-webkit-animation-name: fadeInLeftBig;
	-moz-animation-name: fadeInLeftBig;
	-ms-animation-name: fadeInLeftBig;
	-o-animation-name: fadeInLeftBig;
	animation-name: fadeInLeftBig;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#fadeinleftbig" class="button" target="_blank">Demo CSS Fade In Left Big</a></p><h2>CSS Fade Out Animation</h2><p>Makes the HTML element fade out.</p><pre>
@-webkit-keyframes fadeOut {
	0% {opacity: 1;}
	100% {opacity: 0;}
}

@-moz-keyframes fadeOut {
	0% {opacity: 1;}
	100% {opacity: 0;}
}

@-ms-keyframes fadeOut {
	0% {opacity: 1;}
	100% {opacity: 0;}
}

@-o-keyframes fadeOut {
	0% {opacity: 1;}
	100% {opacity: 0;}
}

@keyframes fadeOut {
	0% {opacity: 1;}
	100% {opacity: 0;}
}

.fadeOut {
	-webkit-animation-name: fadeOut;
	-moz-animation-name: fadeOut;
	-ms-animation-name: fadeOut;
	-o-animation-name: fadeOut;
	animation-name: fadeOut;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#fadeout" class="button" target="_blank">Demo CSS Fade Out</a></p><h2>CSS Fade Out Down Big Animation</h2><p>Makes the HTML element fade out down the page.</p><pre>
@-webkit-keyframes fadeOutDownBig {
	0% {
		opacity: 1;
		-webkit-transform: translateY(0);
	}

	100% {
		opacity: 0;
		-webkit-transform: translateY(2000px);
	}
}

@-moz-keyframes fadeOutDownBig {
	0% {
		opacity: 1;
		-moz-transform: translateY(0);
	}

	100% {
		opacity: 0;
		-moz-transform: translateY(2000px);
	}
}

@-ms-keyframes fadeOutDownBig {
	0% {
		opacity: 1;
		-ms-transform: translateY(0);
	}

	100% {
		opacity: 0;
		-ms-transform: translateY(2000px);
	}
}

@-o-keyframes fadeOutDownBig {
	0% {
		opacity: 1;
		-o-transform: translateY(0);
	}

	100% {
		opacity: 0;
		-o-transform: translateY(2000px);
	}
}

@keyframes fadeOutDownBig {
	0% {
		opacity: 1;
		transform: translateY(0);
	}

	100% {
		opacity: 0;
		transform: translateY(2000px);
	}
}

.fadeOutDownBig {
	-webkit-animation-name: fadeOutDownBig;
	-moz-animation-name: fadeOutDownBig;
	-ms-animation-name: fadeOutDownBig;
	-o-animation-name: fadeOutDownBig;
	animation-name: fadeOutDownBig;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#fadeoutdownbig" class="button" target="_blank">Demo CSS Fade Out Down Big</a></p><h2>CSS Fade Out Right Big Animation</h2><p>Makes the HTML element slide off the page to the right.</p><pre>
@-webkit-keyframes fadeOutRightBig {
	0% {
		opacity: 1;
		-webkit-transform: translateX(0);
	}

	100% {
		opacity: 0;
		-webkit-transform: translateX(2000px);
	}
}
@-moz-keyframes fadeOutRightBig {
	0% {
		opacity: 1;
		-moz-transform: translateX(0);
	}

	100% {
		opacity: 0;
		-moz-transform: translateX(2000px);
	}
}
@-ms-keyframes fadeOutRightBig {
	0% {
		opacity: 1;
		-ms-transform: translateX(0);
	}

	100% {
		opacity: 0;
		-ms-transform: translateX(2000px);
	}
}
@-o-keyframes fadeOutRightBig {
	0% {
		opacity: 1;
		-o-transform: translateX(0);
	}

	100% {
		opacity: 0;
		-o-transform: translateX(2000px);
	}
}
@keyframes fadeOutRightBig {
	0% {
		opacity: 1;
		transform: translateX(0);
	}

	100% {
		opacity: 0;
		transform: translateX(2000px);
	}
}

.fadeOutRightBig {
	-webkit-animation-name: fadeOutRightBig;
	-moz-animation-name: fadeOutRightBig;
	-ms-animation-name: fadeOutRightBig;
	-o-animation-name: fadeOutRightBig;
	animation-name: fadeOutRightBig;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#fadeoutrightbig" class="button" target="_blank">Demo CSS Fade Out Right Big</a></p><h2>CSS Bounce In Animation</h2><p>Makes the HTML element bounce into view.</p><pre>
@-webkit-keyframes bounceIn {
	0% {
		opacity: 0;
		-webkit-transform: scale(.3);
	}

	50% {
		opacity: 1;
		-webkit-transform: scale(1.05);
	}

	70% {
		-webkit-transform: scale(.9);
	}

	100% {
		-webkit-transform: scale(1);
	}
}

@-moz-keyframes bounceIn {
	0% {
		opacity: 0;
		-moz-transform: scale(.3);
	}

	50% {
		opacity: 1;
		-moz-transform: scale(1.05);
	}

	70% {
		-moz-transform: scale(.9);
	}

	100% {
		-moz-transform: scale(1);
	}
}

@-ms-keyframes bounceIn {
	0% {
		opacity: 0;
		-ms-transform: scale(.3);
	}

	50% {
		opacity: 1;
		-ms-transform: scale(1.05);
	}

	70% {
		-ms-transform: scale(.9);
	}

	100% {
		-ms-transform: scale(1);
	}
}

@-o-keyframes bounceIn {
	0% {
		opacity: 0;
		-o-transform: scale(.3);
	}

	50% {
		opacity: 1;
		-o-transform: scale(1.05);
	}

	70% {
		-o-transform: scale(.9);
	}

	100% {
		-o-transform: scale(1);
	}
}

@keyframes bounceIn {
	0% {
		opacity: 0;
		transform: scale(.3);
	}

	50% {
		opacity: 1;
		transform: scale(1.05);
	}

	70% {
		transform: scale(.9);
	}

	100% {
		transform: scale(1);
	}
}

.bounceIn {
	-webkit-animation-name: bounceIn;
	-moz-animation-name: bounceIn;
	-ms-animation-name: bounceIn;
	-o-animation-name: bounceIn;
	animation-name: bounceIn;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#bouncein" class="button" target="_blank">Demo CSS Bounce In</a></p><h2>CSS Bounce In Right Animation</h2><p>Makes the HTML element bounce in from the right of the page.</p><pre>
@-webkit-keyframes bounceInRight {
	0% {
		opacity: 0;
		-webkit-transform: translateX(2000px);
	}

	60% {
		opacity: 1;
		-webkit-transform: translateX(-30px);
	}

	80% {
		-webkit-transform: translateX(10px);
	}

	100% {
		-webkit-transform: translateX(0);
	}
}

@-moz-keyframes bounceInRight {
	0% {
		opacity: 0;
		-moz-transform: translateX(2000px);
	}

	60% {
		opacity: 1;
		-moz-transform: translateX(-30px);
	}

	80% {
		-moz-transform: translateX(10px);
	}

	100% {
		-moz-transform: translateX(0);
	}
}

@-ms-keyframes bounceInRight {
	0% {
		opacity: 0;
		-ms-transform: translateX(2000px);
	}

	60% {
		opacity: 1;
		-ms-transform: translateX(-30px);
	}

	80% {
		-ms-transform: translateX(10px);
	}

	100% {
		-ms-transform: translateX(0);
	}
}

@-o-keyframes bounceInRight {
	0% {
		opacity: 0;
		-o-transform: translateX(2000px);
	}

	60% {
		opacity: 1;
		-o-transform: translateX(-30px);
	}

	80% {
		-o-transform: translateX(10px);
	}

	100% {
		-o-transform: translateX(0);
	}
}

@keyframes bounceInRight {
	0% {
		opacity: 0;
		transform: translateX(2000px);
	}

	60% {
		opacity: 1;
		transform: translateX(-30px);
	}

	80% {
		transform: translateX(10px);
	}

	100% {
		transform: translateX(0);
	}
}

.bounceInRight {
	-webkit-animation-name: bounceInRight;
	-moz-animation-name: bounceInRight;
	-ms-animation-name: bounceInRight;
	-o-animation-name: bounceInRight;
	animation-name: bounceInRight;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#bounceinright" class="button" target="_blank">Demo CSS Bounce In Right</a></p><h2>CSS Bounce Out Animation</h2><p>Makes the element bounce out of the screen.</p><pre>
@-webkit-keyframes bounceOut {
	0% {
		-webkit-transform: scale(1);
	}

	25% {
		-webkit-transform: scale(.95);
	}

	50% {
		opacity: 1;
		-webkit-transform: scale(1.1);
	}

	100% {
		opacity: 0;
		-webkit-transform: scale(.3);
	}
}

@-moz-keyframes bounceOut {
	0% {
		-moz-transform: scale(1);
	}

	25% {
		-moz-transform: scale(.95);
	}

	50% {
		opacity: 1;
		-moz-transform: scale(1.1);
	}

	100% {
		opacity: 0;
		-moz-transform: scale(.3);
	}
}

@-ms-keyframes bounceOut {
	0% {
		-ms-transform: scale(1);
	}

	25% {
		-ms-transform: scale(.95);
	}

	50% {
		opacity: 1;
		-ms-transform: scale(1.1);
	}

	100% {
		opacity: 0;
		-ms-transform: scale(.3);
	}
}

@-o-keyframes bounceOut {
	0% {
		-o-transform: scale(1);
	}

	25% {
		-o-transform: scale(.95);
	}

	50% {
		opacity: 1;
		-o-transform: scale(1.1);
	}

	100% {
		opacity: 0;
		-o-transform: scale(.3);
	}
}

@keyframes bounceOut {
	0% {
		transform: scale(1);
	}

	25% {
		transform: scale(.95);
	}

	50% {
		opacity: 1;
		transform: scale(1.1);
	}

	100% {
		opacity: 0;
		transform: scale(.3);
	}
}

.bounceOut {
	-webkit-animation-name: bounceOut;
	-moz-animation-name: bounceOut;
	-ms-animation-name: bounceOut;
	-o-animation-name: bounceOut;
	animation-name: bounceOut;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#bounceout" class="button" target="_blank">Demo CSS Bounce Out</a></p><h2>CSS Bounce Out Down Animation</h2><p>Makes the HTML element bounce down off the page.</p><pre>
@-webkit-keyframes bounceOutDown {
	0% {
		-webkit-transform: translateY(0);
	}

	20% {
		opacity: 1;
		-webkit-transform: translateY(-20px);
	}

	100% {
		opacity: 0;
		-webkit-transform: translateY(2000px);
	}
}

@-moz-keyframes bounceOutDown {
	0% {
		-moz-transform: translateY(0);
	}

	20% {
		opacity: 1;
		-moz-transform: translateY(-20px);
	}

	100% {
		opacity: 0;
		-moz-transform: translateY(2000px);
	}
}

@-ms-keyframes bounceOutDown {
	0% {
		-ms-transform: translateY(0);
	}

	20% {
		opacity: 1;
		-ms-transform: translateY(-20px);
	}

	100% {
		opacity: 0;
		-ms-transform: translateY(2000px);
	}
}

@keyframes bounceOutDown {
	0% {
		transform: translateY(0);
	}

	20% {
		opacity: 1;
		transform: translateY(-20px);
	}

	100% {
		opacity: 0;
		transform: translateY(2000px);
	}
}

.bounceOutDown {
	-webkit-animation-name: bounceOutDown;
	-moz-animation-name: bounceOutDown;
	-ms-animation-name: bounceOutDown;
	animation-name: bounceOutDown;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#bounceoutdown" class="button" target="_blank">Demo CSS Bounce Out Down</a></p><h2>CSS Rotate In Down Left Animation</h2><p>Makes the HTML element rotate in from the left.</p><pre>
@-webkit-keyframes rotateInDownLeft {
	0% {
		-webkit-transform-origin: left bottom;
		-webkit-transform: rotate(-90deg);
		opacity: 0;
	}

	100% {
		-webkit-transform-origin: left bottom;
		-webkit-transform: rotate(0);
		opacity: 1;
	}
}

@-moz-keyframes rotateInDownLeft {
	0% {
		-moz-transform-origin: left bottom;
		-moz-transform: rotate(-90deg);
		opacity: 0;
	}

	100% {
		-moz-transform-origin: left bottom;
		-moz-transform: rotate(0);
		opacity: 1;
	}
}

@-ms-keyframes rotateInDownLeft {
	0% {
		-ms-transform-origin: left bottom;
		-ms-transform: rotate(-90deg);
		opacity: 0;
	}

	100% {
		-ms-transform-origin: left bottom;
		-ms-transform: rotate(0);
		opacity: 1;
	}
}

@-o-keyframes rotateInDownLeft {
	0% {
		-o-transform-origin: left bottom;
		-o-transform: rotate(-90deg);
		opacity: 0;
	}

	100% {
		-o-transform-origin: left bottom;
		-o-transform: rotate(0);
		opacity: 1;
	}
}

@keyframes rotateInDownLeft {
	0% {
		transform-origin: left bottom;
		transform: rotate(-90deg);
		opacity: 0;
	}

	100% {
		transform-origin: left bottom;
		transform: rotate(0);
		opacity: 1;
	}
}

.rotateInDownLeft {
	-webkit-animation-name: rotateInDownLeft;
	-moz-animation-name: rotateInDownLeft;
	-ms-animation-name: rotateInDownLeft;
	-o-animation-name: rotateInDownLeft;
	animation-name: rotateInDownLeft;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#rotateindownleft" class="button" target="_blank">Demo CSS Rotate In Down Left</a></p><h2>CSS Rotate In Up Left Animation</h2><p>Makes the HTML element rotate in up from the left.</p><pre>
@-webkit-keyframes rotateInUpLeft {
	0% {
		-webkit-transform-origin: left bottom;
		-webkit-transform: rotate(90deg);
		opacity: 0;
	}

	100% {
		-webkit-transform-origin: left bottom;
		-webkit-transform: rotate(0);
		opacity: 1;
	}
}

@-moz-keyframes rotateInUpLeft {
	0% {
		-moz-transform-origin: left bottom;
		-moz-transform: rotate(90deg);
		opacity: 0;
	}

	100% {
		-moz-transform-origin: left bottom;
		-moz-transform: rotate(0);
		opacity: 1;
	}
}

@-ms-keyframes rotateInUpLeft {
	0% {
		-ms-transform-origin: left bottom;
		-ms-transform: rotate(90deg);
		opacity: 0;
	}

	100% {
		-ms-transform-origin: left bottom;
		-ms-transform: rotate(0);
		opacity: 1;
	}
}

@-o-keyframes rotateInUpLeft {
	0% {
		-o-transform-origin: left bottom;
		-o-transform: rotate(90deg);
		opacity: 0;
	}

	100% {
		-o-transform-origin: left bottom;
		-o-transform: rotate(0);
		opacity: 1;
	}
}

@keyframes rotateInUpLeft {
	0% {
		transform-origin: left bottom;
		transform: rotate(90deg);
		opacity: 0;
	}

	100% {
		transform-origin: left bottom;
		transform: rotate(0);
		opacity: 1;
	}
}

.rotateInUpLeft {
	-webkit-animation-name: rotateInUpLeft;
	-moz-animation-name: rotateInUpLeft;
	-ms-animation-name: rotateInUpLeft;
	-o-animation-name: rotateInUpLeft;
	animation-name: rotateInUpLeft;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#rotateinupleft" class="button" target="_blank">Demo CSS Rotate In Up Left</a></p><h2>CSS Hinge Animation</h2><p>Makes the HTML element hinge on the top left corner and fall off the screen.</p><pre>
@-webkit-keyframes hinge {
	0% { -webkit-transform: rotate(0); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
	20%, 60% { -webkit-transform: rotate(80deg); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
	40% { -webkit-transform: rotate(60deg); -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
	80% { -webkit-transform: rotate(60deg) translateY(0); opacity: 1; -webkit-transform-origin: top left; -webkit-animation-timing-function: ease-in-out; }
	100% { -webkit-transform: translateY(700px); opacity: 0; }
}

@-moz-keyframes hinge {
	0% { -moz-transform: rotate(0); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
	20%, 60% { -moz-transform: rotate(80deg); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
	40% { -moz-transform: rotate(60deg); -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
	80% { -moz-transform: rotate(60deg) translateY(0); opacity: 1; -moz-transform-origin: top left; -moz-animation-timing-function: ease-in-out; }
	100% { -moz-transform: translateY(700px); opacity: 0; }
}

@-ms-keyframes hinge {
	0% { -ms-transform: rotate(0); -ms-transform-origin: top left; -ms-animation-timing-function: ease-in-out; }
	20%, 60% { -ms-transform: rotate(80deg); -ms-transform-origin: top left; -ms-animation-timing-function: ease-in-out; }
	40% { -ms-transform: rotate(60deg); -ms-transform-origin: top left; -ms-animation-timing-function: ease-in-out; }
	80% { -ms-transform: rotate(60deg) translateY(0); opacity: 1; -ms-transform-origin: top left; -ms-animation-timing-function: ease-in-out; }
	100% { -ms-transform: translateY(700px); opacity: 0; }
}

@-o-keyframes hinge {
	0% { -o-transform: rotate(0); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
	20%, 60% { -o-transform: rotate(80deg); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
	40% { -o-transform: rotate(60deg); -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
	80% { -o-transform: rotate(60deg) translateY(0); opacity: 1; -o-transform-origin: top left; -o-animation-timing-function: ease-in-out; }
	100% { -o-transform: translateY(700px); opacity: 0; }
}

@keyframes hinge {
	0% { transform: rotate(0); transform-origin: top left; animation-timing-function: ease-in-out; }
	20%, 60% { transform: rotate(80deg); transform-origin: top left; animation-timing-function: ease-in-out; }
	40% { transform: rotate(60deg); transform-origin: top left; animation-timing-function: ease-in-out; }
	80% { transform: rotate(60deg) translateY(0); opacity: 1; transform-origin: top left; animation-timing-function: ease-in-out; }
	100% { transform: translateY(700px); opacity: 0; }
}

.hinge {
	-webkit-animation-name: hinge;
	-moz-animation-name: hinge;
	-ms-animation-name: hinge;
	-o-animation-name: hinge;
	animation-name: hinge;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#hinge" class="button" target="_blank">Demo CSS Hinge</a></p><h2>CSS Roll In Animation</h2><p>Makes the HTML element roll in.</p><pre>
@-webkit-keyframes rollIn {
	0% { opacity: 0; -webkit-transform: translateX(-100%) rotate(-120deg); }
	100% { opacity: 1; -webkit-transform: translateX(0px) rotate(0deg); }
}

@-moz-keyframes rollIn {
	0% { opacity: 0; -moz-transform: translateX(-100%) rotate(-120deg); }
	100% { opacity: 1; -moz-transform: translateX(0px) rotate(0deg); }
}

@-ms-keyframes rollIn {
	0% { opacity: 0; -ms-transform: translateX(-100%) rotate(-120deg); }
	100% { opacity: 1; -ms-transform: translateX(0px) rotate(0deg); }
}

@-o-keyframes rollIn {
	0% { opacity: 0; -o-transform: translateX(-100%) rotate(-120deg); }
	100% { opacity: 1; -o-transform: translateX(0px) rotate(0deg); }
}

@keyframes rollIn {
	0% { opacity: 0; transform: translateX(-100%) rotate(-120deg); }
	100% { opacity: 1; transform: translateX(0px) rotate(0deg); }
}

.rollIn {
	-webkit-animation-name: rollIn;
	-moz-animation-name: rollIn;
	-ms-animation-name: rollIn;
	-o-animation-name: rollIn;
	animation-name: rollIn;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#rollin" class="button" target="_blank">Demo CSS Roll In Animation</a></p><h2>CSS Roll Out Animation</h2><p>Makes the HTML element roll out.</p><pre>
@-webkit-keyframes rollOut {
    0% {
		opacity: 1;
		-webkit-transform: translateX(0px) rotate(0deg);
	}

    100% {
		opacity: 0;
		-webkit-transform: translateX(100%) rotate(120deg);
	}
}

@-moz-keyframes rollOut {
    0% {
		opacity: 1;
		-moz-transform: translateX(0px) rotate(0deg);
	}

    100% {
		opacity: 0;
		-moz-transform: translateX(100%) rotate(120deg);
	}
}

@-ms-keyframes rollOut {
    0% {
		opacity: 1;
		-ms-transform: translateX(0px) rotate(0deg);
	}

    100% {
		opacity: 0;
		-ms-transform: translateX(100%) rotate(120deg);
	}
}

@-o-keyframes rollOut {
    0% {
		opacity: 1;
		-o-transform: translateX(0px) rotate(0deg);
	}

    100% {
		opacity: 0;
		-o-transform: translateX(100%) rotate(120deg);
	}
}

@keyframes rollOut {
    0% {
		opacity: 1;
		transform: translateX(0px) rotate(0deg);
	}

    100% {
		opacity: 0;
		transform: translateX(100%) rotate(120deg);
	}
}

.rollOut {
	-webkit-animation-name: rollOut;
	-moz-animation-name: rollOut;
	-ms-animation-name: rollOut;
	-o-animation-name: rollOut;
	animation-name: rollOut;
}
</pre><p><a href="http://www.paulund.co.uk/playground/demo/animate_css/index.php#rollout" class="button" target="_blank">Demo CSS Roll Out Animation</a></p><h2>Download Animate.css</h2><p>I recommend you download the project from Github even if it&#8217;s just to look at the source code and learn all the different things you can do with CSS animations.</p><p>You can get it right now from Github.</p><p><a href="https://github.com/daneden/animate.css" class="button">Download Animation.css</a></p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=B_qY0_P2zLY:MsqeJdqzKvI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=B_qY0_P2zLY:MsqeJdqzKvI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=B_qY0_P2zLY:MsqeJdqzKvI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=B_qY0_P2zLY:MsqeJdqzKvI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=B_qY0_P2zLY:MsqeJdqzKvI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=B_qY0_P2zLY:MsqeJdqzKvI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=B_qY0_P2zLY:MsqeJdqzKvI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=B_qY0_P2zLY:MsqeJdqzKvI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=B_qY0_P2zLY:MsqeJdqzKvI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=B_qY0_P2zLY:MsqeJdqzKvI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/B_qY0_P2zLY" height="1" width="1"/>]]></content:encoded><description>In this tutorial we going to look into the open source project which has become very popular lately&amp;#8230;Animate.css. This is a project which is currently hosted on Github where you can download the source. We are going to look at some of the best CSS animation effects out of the 53 CSS Animation effects you [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/css-animate-effects-we-can-learn-from-animate-css/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.paulund.co.uk/css-animate-effects-we-can-learn-from-animate-css</feedburner:origLink></item><item><title>New Technique To text-indent:-9999px Hack</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/nZAtlU6GP2c/new-technique-to-text-indent-9999px-hack</link><category>CSS</category><category>coding</category><category>hide</category><category>technique</category><category>Text</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Sat, 19 May 2012 20:31:30 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5515</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>There is a very well known technique in web design to <a href="http://www.paulund.co.uk/hide-header1-text-if-using-logo-image" title="Hide Header1 Text if using Logo Image">hide text on the page by adding a text-indent</a> CSS property of <strong>-9999px</strong>.</p><p>This moves the text off the page out of the view of the visitor, you will hear that this can be harmful to your SEO as you are trying to hide content from the visitor of the site.</p><p>But if you are using an image as your logo on your website you would need to add an image to the page by using the image tag.</p><pre>
&lt;img src=&quot;logo.png&quot; /&gt;
</pre><p>The problem with this is that you don&#8217;t have the keywords of your website title on the page, you can add your website title to the alt attribute but it doesn&#8217;t add as much weight to having your website title in a h1 tag on the page.<br /> <span id="more-5515"></span><br /> But if you use a h1 tag you can&#8217;t add an image as your website logo, the only way to achieve this is to add your image as a background image to your h1 tag and have your text inside the h1 tag. This brings another problem that now you will have both your logo and text of your website title.</p><p>This is where the <code>text-indent:-9999px</code> technique came in, if you add this to your CSS file then you can have both your website logo and text inside the h1.</p><p>&lt;h1&gt;Website Title&lt;/h1&gt;</p><pre>
h1 {
    text-indent:-9999px;
    margin:0 auto;
    width:300px;
    height:100px;
    background:transparent url("images/logo.jpg") no-repeat scroll;
}
</pre><p>This technique worked fine, but the downside to this technique is that it has a performance hit as the browser will draw a giant 9999px box offscreen.</p><h2>New Technique Hide Text Off Page</h2><p>There is a article on <a href="http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/" title="Zeldman">Zeldman</a> which explains a new technique of hiding text off the page.</p><pre>
.hide-text {
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
}
</pre><p>This places the text off the page, it doesn&#8217;t matter on the size of page. We add the nowrap so the text will always continue to flow off the page and we make sure that any overflow of the text will continue to be hidden from the page.</p><p>The best part about this technique is that performance is increased because there is less things for the browser to do.</p><p>Has anyone used this new technique? Have you found any drawbacks to using it?</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=nZAtlU6GP2c:zW4YD3ir1Hs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=nZAtlU6GP2c:zW4YD3ir1Hs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=nZAtlU6GP2c:zW4YD3ir1Hs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=nZAtlU6GP2c:zW4YD3ir1Hs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=nZAtlU6GP2c:zW4YD3ir1Hs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=nZAtlU6GP2c:zW4YD3ir1Hs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=nZAtlU6GP2c:zW4YD3ir1Hs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=nZAtlU6GP2c:zW4YD3ir1Hs:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=nZAtlU6GP2c:zW4YD3ir1Hs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=nZAtlU6GP2c:zW4YD3ir1Hs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/nZAtlU6GP2c" height="1" width="1"/>]]></content:encoded><description>There is a very well known technique in web design to hide text on the page by adding a text-indent CSS property of -9999px. This moves the text off the page out of the view of the visitor, you will hear that this can be harmful to your SEO as you are trying to hide [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/new-technique-to-text-indent-9999px-hack/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://www.paulund.co.uk/new-technique-to-text-indent-9999px-hack</feedburner:origLink></item><item><title>Create Custom Image Sizes For Your WordPress Theme</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/O-k-EQbVXoY/create-custom-image-sizes-for-your-wordpress-theme</link><category>Wordpress</category><category>Compress</category><category>cropped</category><category>Image</category><category>reduce</category><category>size</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Sat, 19 May 2012 07:02:47 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5475</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>When you upload an image to WordPress it will automatically convert the same Image to multiple sizes while still keep the best quality.</p><p>The default image sizes are setup on the settings -> media screen.</p><p><img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/05/Media-Settings-590x220.png" alt="Media Settings" title="Media Settings" width="590" height="220" class="aligncenter size-large wp-image-5865" /></p><p>But WordPress will only allow you to use 3 image sizes, thumbnail, medium and large which you can choose from when you add the image to your post.</p><p>If you want more options for options then you need to add a bit of code into your functions.php file, use the below snippet to add additional images sizes to your media files.</p><p>This uses the WordPress function add_image_size to add a <a href="http://codex.wordpress.org/Function_Reference/add_image_size" title="Add image size" target="_blank">new image size</a> to your WordPress theme.<br /> <span id="more-5475"></span></p><pre>
&lt;?php
     if ( function_exists( &#039;add_image_size&#039; ) ) {
	add_image_size( &#039;custom-image-size1&#039;, 300, 9999 ); //300 pixels wide (and unlimited height)
	add_image_size( &#039;custom-image-size2&#039;, 220, 180, true ); //(cropped)
     }
?&gt;
</pre><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O-k-EQbVXoY:IHVDMh7Xv-Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O-k-EQbVXoY:IHVDMh7Xv-Y:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O-k-EQbVXoY:IHVDMh7Xv-Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=O-k-EQbVXoY:IHVDMh7Xv-Y:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O-k-EQbVXoY:IHVDMh7Xv-Y:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=O-k-EQbVXoY:IHVDMh7Xv-Y:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O-k-EQbVXoY:IHVDMh7Xv-Y:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O-k-EQbVXoY:IHVDMh7Xv-Y:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=O-k-EQbVXoY:IHVDMh7Xv-Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=O-k-EQbVXoY:IHVDMh7Xv-Y:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/O-k-EQbVXoY" height="1" width="1"/>]]></content:encoded><description>When you upload an image to WordPress it will automatically convert the same Image to multiple sizes while still keep the best quality. The default image sizes are setup on the settings -&gt; media screen. But WordPress will only allow you to use 3 image sizes, thumbnail, medium and large which you can choose from [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/create-custom-image-sizes-for-your-wordpress-theme/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.paulund.co.uk/create-custom-image-sizes-for-your-wordpress-theme</feedburner:origLink></item><item><title>Detect IPhone, IPad or IPod User With Javascript</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/JkDBLrn5HEM/detect-iphone-ipad-or-ipod-user-with-javascript</link><category>Javascript</category><category>ipad</category><category>iPhone</category><category>iPod</category><category>JavaScript</category><category>media</category><category>queries</category><category>snippet</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Thu, 17 May 2012 20:46:59 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5488</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>With mobile devices becoming more and more popular there will be times when you need to do something different for users coming to your site from one of these mobile devices.</p><p>If you want to change the design depending on the mobile device you will use <a href="http://www.paulund.co.uk/ios-media-queries-boilerplate" title="iOS Media Queries Boilerplate">media queries</a>. But if you want to change functionality such as Javascript then you can use the below snippet to do something different for mobile devices.<br /> <span id="more-5488"></span></p><pre>
&lt;script&gt;
if ((navigator.userAgent.indexOf(&#039;iPhone&#039;) != -1) || (navigator.userAgent.indexOf(&#039;iPod&#039;) != -1) || (navigator.userAgent.indexOf(&#039;iPad&#039;) != -1)) {
	alert(&#039;You are using an iPhone, ipod or an ipad&#039;);
}
&lt;/script&gt;
</pre><p>I&#8217;ve added this script to this page so if you visit this page on a iPhone, ipod or an ipad then you will see an alert box.</p><p><script>if((navigator.userAgent.indexOf('iPhone')!=-1)||(navigator.userAgent.indexOf('iPod')!=-1)||(navigator.userAgent.indexOf('iPad')!=-1)){alert('You are using an iPhone, ipod or an ipad');}</script></p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=JkDBLrn5HEM:MdjAcKt9cNk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=JkDBLrn5HEM:MdjAcKt9cNk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=JkDBLrn5HEM:MdjAcKt9cNk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=JkDBLrn5HEM:MdjAcKt9cNk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=JkDBLrn5HEM:MdjAcKt9cNk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=JkDBLrn5HEM:MdjAcKt9cNk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=JkDBLrn5HEM:MdjAcKt9cNk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=JkDBLrn5HEM:MdjAcKt9cNk:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=JkDBLrn5HEM:MdjAcKt9cNk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=JkDBLrn5HEM:MdjAcKt9cNk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/JkDBLrn5HEM" height="1" width="1"/>]]></content:encoded><description>With mobile devices becoming more and more popular there will be times when you need to do something different for users coming to your site from one of these mobile devices. If you want to change the design depending on the mobile device you will use media queries. But if you want to change functionality [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/detect-iphone-ipad-or-ipod-user-with-javascript/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.paulund.co.uk/detect-iphone-ipad-or-ipod-user-with-javascript</feedburner:origLink></item><item><title>Create A Full Page Background Image</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/so7UczCj4Uo/create-a-full-page-background-image</link><category>CSS</category><category>Background</category><category>contain</category><category>cover</category><category>Image</category><category>size</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Thu, 17 May 2012 13:07:34 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5492</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>In this snippet we are looking at what you can do with the <a href="https://developer.mozilla.org/en/CSS/background-size" title="Background-size">CSS background-size property</a>. This property will allow you to define the size of the image that you have defined as the <strong>background image</strong>, similar to how you will use the width and height when adding an image.</p><p>The value of the <strong>background-size property</strong> can either be:</p><ul><li>Contains &#8211; This specifies that the image should be scaled to as large as possible while being less or equal to the background of the element.</li><li>Covers &#8211; This specifies that the image should be scaled to as small as possible while being greater or equal to the background of the element.</li><li>Percentage</li><li>Length</li><li>Auto</li></ul><p>Therefore to make the image cover the entire background of the HTML element you will need to use the cover value just like the snippet below.<br /> <span id="more-5492"></span></p><pre>
html {
  background: url(img/background.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
</pre><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=so7UczCj4Uo:44aQWo902tg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=so7UczCj4Uo:44aQWo902tg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=so7UczCj4Uo:44aQWo902tg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=so7UczCj4Uo:44aQWo902tg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=so7UczCj4Uo:44aQWo902tg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=so7UczCj4Uo:44aQWo902tg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=so7UczCj4Uo:44aQWo902tg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=so7UczCj4Uo:44aQWo902tg:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=so7UczCj4Uo:44aQWo902tg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=so7UczCj4Uo:44aQWo902tg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/so7UczCj4Uo" height="1" width="1"/>]]></content:encoded><description>In this snippet we are looking at what you can do with the CSS background-size property. This property will allow you to define the size of the image that you have defined as the background image, similar to how you will use the width and height when adding an image. The value of the background-size [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/create-a-full-page-background-image/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.paulund.co.uk/create-a-full-page-background-image</feedburner:origLink></item><item><title>Change The Enter Title Text For Custom Post Types</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/3bMjtzaWG_Q/change-the-enter-title-text-for-custom-post-types</link><category>Wordpress</category><category>enter</category><category>new</category><category>product</category><category>title</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Thu, 17 May 2012 12:46:39 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5496</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Since discovering <a href="http://www.paulund.co.uk/limit-wordpress-search-results-to-certain-post-types" title="Limit WordPress Search Results To Certain Post Types">WordPress custom post types</a> I&#8217;ve always wanted to customise the WordPress dashboard area. Your able to do this to a certain level by using labels on your custom post types. This will change where ever it says posts to the label of your custom post type.</p><p><img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/Enter_text_here-590x79.png" alt="Enter_text_here" title="Enter_text_here" width="590" height="79" class="aligncenter size-large wp-image-5713" /></p><p>But WordPress doesn&#8217;t change the default <strong>Enter Title Here</strong> text, so if you create a new product custom post type then you can change the <strong>Enter Title Here</strong> to <strong>Enter New Product Here</strong>.<br /> <span id="more-5496"></span><br /> Add this to your functions.php file to change the Enter Title Here text.</p><pre>
function change_default_title( $title ){
     $screen = get_current_screen();

     if  ( $screen->post_type == 'product' ) {
          return 'Enter New Product Here';
     }
}

add_filter( 'enter_title_here', 'change_default_title' );
</pre><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=3bMjtzaWG_Q:xoLvqg75m6I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=3bMjtzaWG_Q:xoLvqg75m6I:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=3bMjtzaWG_Q:xoLvqg75m6I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=3bMjtzaWG_Q:xoLvqg75m6I:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=3bMjtzaWG_Q:xoLvqg75m6I:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=3bMjtzaWG_Q:xoLvqg75m6I:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=3bMjtzaWG_Q:xoLvqg75m6I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=3bMjtzaWG_Q:xoLvqg75m6I:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=3bMjtzaWG_Q:xoLvqg75m6I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=3bMjtzaWG_Q:xoLvqg75m6I:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/3bMjtzaWG_Q" height="1" width="1"/>]]></content:encoded><description>Since discovering WordPress custom post types I&amp;#8217;ve always wanted to customise the WordPress dashboard area. Your able to do this to a certain level by using labels on your custom post types. This will change where ever it says posts to the label of your custom post type. But WordPress doesn&amp;#8217;t change the default Enter [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/change-the-enter-title-text-for-custom-post-types/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.paulund.co.uk/change-the-enter-title-text-for-custom-post-types</feedburner:origLink></item><item><title>Creating WordPress Custom Page Templates</title><link>http://feedproxy.google.com/~r/Paulundcouk/~3/qtYsPIc6JtA/creating-wordpress-custom-page-templates</link><category>Wordpress</category><category>archive</category><category>contact</category><category>custom</category><category>full width</category><category>page</category><category>template</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul</dc:creator><pubDate>Tue, 15 May 2012 20:33:48 PDT</pubDate><guid isPermaLink="false">http://www.paulund.co.uk/?p=5218</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p><img src="http://paulund.paulund.netdna-cdn.com/wp-content/uploads/2012/04/wp-custom-page-template.png" alt="wp-custom-page-template" title="wp-custom-page-template" width="283" height="448" class="aligncenter size-full wp-image-5348" /></p><p>In <strong>WordPress</strong> you start off with 2 default types of posts you have the standard posts and you also have pages.</p><p>For these types of posts WordPress will use different PHP files to display the content, the standard posts will use the single.php file and the pages will use the page.php file.</p><p>But the problem with this is that you can only use one file for your pages so you can&#8217;t have different page layouts or styles. This is why WordPress created the ability to create <strong>custom page templates</strong>, which allows developers to create as many different <strong>page templates</strong> as they want.<br /> <span id="more-5218"></span></p><h2>Create A Custom Page Template</h2><p>To create a <a href="http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates" title="Custom page template">custom page template</a> all you have to do is add a new blank php file to your <a href="http://www.paulund.co.uk/what-makes-a-premium-wordpress-theme-premium" title="What Makes A Premium WordPress Theme Premium?">theme directory</a> and save this as <strong>custom_page_template.php</strong>. Within this new file all you have to do is add comments to the top of the file.</p><pre>
&lt;?php
/*
Template Name: Custom Page Template
*/
?&gt;
</pre><p>Adding this to the top will automatically add this file to a drop down when adding a new page, from the drop down you will see the default template (page.php) and Custom Page Template.</p><p>If you select the new page to use the Custom Page Template then this will override the page.php and your page will use your custom page template.</p><h2>Examples Of Custom Page Template</h2><p>Some of the common examples of <strong>custom page templates</strong> are contact pages, full width pages and <a href="http://www.paulund.co.uk/archives" title="Archives">archive pages</a>.</p><h3>Create A Contact Page Template</h3><p>The <strong>contact page</strong> will make it easy for your website visitors to send an email to the admin email address of your WordPress blog.</p><p>Below is an example to use for a contact us page, you can copy and paste this code into a new PHP file to easily add contact pages to your WordPress theme.</p><pre>
&lt;?php
/*
Template Name: Contact
*/
?&gt;
&lt;?php 

$nameError = &#039;&#039;;
$emailError = &#039;&#039;;
$commentError = &#039;&#039;;
$sumError = &#039;&#039;;

if(isset($_POST[&#039;submitted&#039;])) {
		if(trim($_POST[&#039;contactName&#039;]) === &#039;&#039;) {
			$nameError = &#039;Please enter your name.&#039;;
			$hasError = true;
		} else {
			$name = trim($_POST[&#039;contactName&#039;]);
		}

		if(trim($_POST[&#039;email&#039;]) === &#039;&#039;)  {
			$emailError = &#039;Please enter your email address.&#039;;
			$hasError = true;
		} else if (!eregi(&quot;^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$&quot;, trim($_POST[&#039;email&#039;]))) {
			$emailError = &#039;You entered an invalid email address.&#039;;
			$hasError = true;
		} else {
			$email = trim($_POST[&#039;email&#039;]);
		}

		if(trim($_POST[&#039;comments&#039;]) === &#039;&#039;) {
			$commentError = &#039;Please enter a message.&#039;;
			$hasError = true;
		} else {
			if(function_exists(&#039;stripslashes&#039;)) {
				$comments = stripslashes(trim($_POST[&#039;comments&#039;]));
			} else {
				$comments = trim($_POST[&#039;comments&#039;]);
			}
		}

		if(trim($_POST[&#039;sum&#039;]) === &#039;&#039; || trim($_POST[&#039;sum&#039;]) != &#039;11&#039; ){
			$sumError = &quot;Please enter what&#039;s 7 + 4&quot;;
			$hasError = true;
		}

		if(!isset($hasError)) {
			$emailTo = get_option(&#039;pu_email&#039;);
			if (!isset($emailTo) || ($emailTo == &#039;&#039;) ){
				$emailTo = get_option(&#039;admin_email&#039;);
			}
			$subject = &#039;[Contact Form] From &#039;.$name;
			$body = &quot;Name: $name \n\nEmail: $email \n\nComments: $comments&quot;;
			$headers = &#039;From: &#039;.$name.&#039; &lt;&#039;.$emailTo.&#039;&gt;&#039; . &quot;\r\n&quot; . &#039;Reply-To: &#039; . $emailTo;

			mail($emailTo, $subject, $body, $headers);
			$emailSent = true;
		}

} ?&gt;

&lt;?php get_header(); ?&gt;

&lt;section class=&quot;box grid_9 list_posts&quot;&gt;
  		&lt;div class=&quot;inner&quot;&gt;

				&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

					&lt;div &lt;?php post_class() ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;

						&lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;

						&lt;div class=&quot;entry-content&quot;&gt;

							&lt;div class=&quot;contact-form clearfix&quot;&gt;

							&lt;?php if(isset($emailSent) &amp;&amp; $emailSent == true) { ?&gt;

                                &lt;div class=&quot;thanks&quot;&gt;
                                    &lt;p&gt;&lt;?php _e(&#039;Thanks, your email was sent successfully.&#039;, &#039;framework&#039;) ?&gt;&lt;/p&gt;
                                &lt;/div&gt;

                            &lt;?php } else { ?&gt;

                                &lt;?php the_content(); ?&gt;

                                &lt;?php if(isset($hasError) || isset($captchaError)) { ?&gt;
                                    &lt;p class=&quot;error&quot;&gt;&lt;?php _e(&#039;Sorry, an error occured.&#039;, &#039;framework&#039;) ?&gt;&lt;p&gt;
                                &lt;?php } ?&gt;

                                &lt;form action=&quot;&lt;?php the_permalink(); ?&gt;&quot; id=&quot;contactForm&quot; method=&quot;post&quot;&gt;
                                    &lt;ul class=&quot;contactform&quot;&gt;
                                        &lt;li&gt;&lt;label for=&quot;contactName&quot;&gt;&lt;?php _e(&#039;Name:&#039;, &#039;framework&#039;) ?&gt;&lt;/label&gt;
                                            &lt;input type=&quot;text&quot; name=&quot;contactName&quot; id=&quot;contactName&quot; value=&quot;&lt;?php if(isset($_POST[&#039;contactName&#039;])) echo $_POST[&#039;contactName&#039;];?&gt;&quot; class=&quot;required requiredField&quot; /&gt;
                                            &lt;?php if($nameError != &#039;&#039;) { ?&gt;
                                                &lt;span class=&quot;error&quot;&gt;&lt;?php echo $nameError; ?&gt;&lt;/span&gt;
                                            &lt;?php } ?&gt;
                                        &lt;/li&gt;

                                        &lt;li&gt;&lt;label for=&quot;email&quot;&gt;&lt;?php _e(&#039;Email:&#039;, &#039;framework&#039;) ?&gt;&lt;/label&gt;
                                            &lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&lt;?php if(isset($_POST[&#039;email&#039;]))  echo $_POST[&#039;email&#039;];?&gt;&quot; class=&quot;required requiredField email&quot; /&gt;
                                            &lt;?php if($emailError != &#039;&#039;) { ?&gt;
                                                &lt;span class=&quot;error&quot;&gt;&lt;?php echo $emailError; ?&gt;&lt;/span&gt;
                                            &lt;?php } ?&gt;
                                        &lt;/li&gt;

                                        &lt;li class=&quot;textarea&quot;&gt;&lt;label for=&quot;commentsText&quot;&gt;&lt;?php _e(&#039;Message:&#039;, &#039;framework&#039;) ?&gt;&lt;/label&gt;
                                            &lt;textarea name=&quot;comments&quot; id=&quot;commentsText&quot; rows=&quot;20&quot; cols=&quot;30&quot; class=&quot;required requiredField&quot;&gt;&lt;?php if(isset($_POST[&#039;comments&#039;])) { if(function_exists(&#039;stripslashes&#039;)) { echo stripslashes($_POST[&#039;comments&#039;]); } else { echo $_POST[&#039;comments&#039;]; } } ?&gt;&lt;/textarea&gt;
                                            &lt;?php if($commentError != &#039;&#039;) { ?&gt;
                                                &lt;span class=&quot;error&quot;&gt;&lt;?php echo $commentError; ?&gt;&lt;/span&gt;
                                            &lt;?php } ?&gt;
                                        &lt;/li&gt;

                                        &lt;li&gt;&lt;label for=&quot;sum&quot;&gt;&lt;?php _e(&#039;7 + 4:&#039;, &#039;framework&#039;) ?&gt;&lt;/label&gt;
                                            &lt;input type=&quot;text&quot; name=&quot;sum&quot; id=&quot;sum&quot; value=&quot;&lt;?php if(isset($_POST[&#039;sum&#039;])) echo $_POST[&#039;sum&#039;];?&gt;&quot; class=&quot;required requiredField&quot; /&gt;
                                            &lt;?php if($sumError != &#039;&#039;) { ?&gt;
                                                &lt;br/&gt;&lt;span class=&quot;error&quot;&gt;&lt;?php echo $sumError; ?&gt;&lt;/span&gt;
                                            &lt;?php } ?&gt;
                                        &lt;/li&gt;

                                        &lt;li class=&quot;buttons&quot;&gt;
                                            &lt;input type=&quot;hidden&quot; name=&quot;submitted&quot; id=&quot;submitted&quot; value=&quot;true&quot; /&gt;
                                            &lt;label&gt;&lt;/label&gt;&lt;button class=&quot;button-message&quot; type=&quot;submit&quot;&gt;&lt;?php _e(&#039;Send Email&#039;, &#039;framework&#039;) ?&gt;&lt;/button&gt;
                                        &lt;/li&gt;
                                    &lt;/ul&gt;
                                &lt;/form&gt;
                            &lt;?php } ?&gt;

							&lt;/div&gt;
						&lt;/div&gt;
					&lt;/div&gt;

					&lt;?php endwhile; else: ?&gt;

					&lt;div id=&quot;post-0&quot; &lt;?php post_class() ?&gt;&gt;

						&lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php _e(&#039;Error 404 - Not Found&#039;, &#039;framework&#039;) ?&gt;&lt;/h1&gt;

						&lt;div class=&quot;entry-content&quot;&gt;
							&lt;p&gt;&lt;?php _e(&quot;Sorry, but you are looking for something that isn&#039;t here.&quot;, &quot;framework&quot;) ?&gt;&lt;/p&gt;
							&lt;?php get_search_form(); ?&gt;
						&lt;/div&gt;
					&lt;/div&gt;

				&lt;?php endif; ?&gt;

			&lt;/div&gt;
    &lt;/section&gt;

    &lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre><h3>Full Width Page Template</h3><p>The full width page template is a template I use which the main difference is that the sidebar has been removed and makes the content area stretch across the width of the page.</p><pre>
&lt;?php
/*
Template Name: Fullwidth
*/
?&gt;

&lt;?php get_header(); ?&gt;

&lt;section class=&quot;box grid_12 list_posts&quot;&gt;
  		&lt;div class=&quot;inner&quot;&gt;

			&lt;article id=&quot;primary&quot; class=&quot;hfeed&quot;&gt;
			&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

				&lt;div &lt;?php post_class() ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
					&lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;

					&lt;div class=&quot;entry-content&quot;&gt;
						&lt;?php the_content(); ?&gt;
						&lt;?php wp_link_pages(array(&#039;before&#039; =&gt; &#039;&lt;p&gt;&lt;strong&gt;&#039;.__(&#039;Pages:&#039;, &#039;framework&#039;).&#039;&lt;/strong&gt; &#039;, &#039;after&#039; =&gt; &#039;&lt;/p&gt;&#039;, &#039;next_or_number&#039; =&gt; &#039;number&#039;)); ?&gt;

					&lt;/div&gt;
				&lt;/div&gt;

				&lt;?php comments_template(&#039;&#039;, true); ?&gt;

				&lt;?php endwhile; endif; ?&gt;
			&lt;/article&gt;
			&lt;/div&gt;
		&lt;/section&gt;

&lt;?php get_footer(); ?&gt;
</pre><h3>Create An Archives Page Template</h3><p>The <a href="http://www.paulund.co.uk/archives" title="Archives">archive page template</a> will display a list of all your old post. In this template it will list all the posts from the previous 30 days, list the posts by month and list the posts by category.</p><p>Copy the following in a new PHP page template.</p><pre>
&lt;?php
/*
Template Name: Archives
*/
?&gt;

&lt;?php get_header(); ?&gt;

&lt;section class=&quot;box grid_9 list_posts&quot;&gt;
  		&lt;div class=&quot;inner&quot;&gt;

				&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

					&lt;div &lt;?php post_class() ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;

						&lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;

						&lt;div class=&quot;entry-content&quot;&gt;

                            &lt;div class=&quot;archive-lists&quot;&gt;

                                &lt;h4&gt;&lt;?php _e(&#039;Last 30 Posts&#039;, &#039;framework&#039;) ?&gt;&lt;/h4&gt;

                                &lt;ul&gt;
                                &lt;?php $archive_30 = get_posts(&#039;numberposts=30&#039;);
                                foreach($archive_30 as $post) : ?&gt;
                                    &lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title();?&gt;&lt;/a&gt;&lt;/li&gt;
                                &lt;?php endforeach; ?&gt;
                                &lt;/ul&gt;

                                &lt;h4&gt;&lt;?php _e(&#039;Archives by Month:&#039;, &#039;framework&#039;) ?&gt;&lt;/h4&gt;

                                &lt;ul&gt;
                                    &lt;?php wp_get_archives(&#039;type=monthly&#039;); ?&gt;
                                &lt;/ul&gt;

                                &lt;h4&gt;&lt;?php _e(&#039;Archives by Subject:&#039;, &#039;framework&#039;) ?&gt;&lt;/h4&gt;

                                &lt;ul&gt;
                                    &lt;?php wp_list_categories( &#039;title_li=&#039; ); ?&gt;
                                &lt;/ul&gt;

                            &lt;/div&gt;
			&lt;/div&gt;
		&lt;/div&gt;

					&lt;?php endwhile; else: ?&gt;

					&lt;div id=&quot;post-0&quot; &lt;?php post_class() ?&gt;&gt;

						&lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php _e(&#039;Error 404 - Not Found&#039;, &#039;framework&#039;) ?&gt;&lt;/h1&gt;

						&lt;div class=&quot;entry-content&quot;&gt;
							&lt;p&gt;&lt;?php _e(&quot;Sorry, but you are looking for something that isn&#039;t here.&quot;, &quot;framework&quot;) ?&gt;&lt;/p&gt;
							&lt;?php get_search_form(); ?&gt;
						&lt;/div&gt;
					&lt;/div&gt;

				&lt;?php endif; ?&gt;
    	&lt;/div&gt;
    &lt;/section&gt;

    &lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre><p>Which custom page templates do you use?</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=qtYsPIc6JtA:ZNHj6feQDGs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=qtYsPIc6JtA:ZNHj6feQDGs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=qtYsPIc6JtA:ZNHj6feQDGs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=qtYsPIc6JtA:ZNHj6feQDGs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=qtYsPIc6JtA:ZNHj6feQDGs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=qtYsPIc6JtA:ZNHj6feQDGs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=qtYsPIc6JtA:ZNHj6feQDGs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=qtYsPIc6JtA:ZNHj6feQDGs:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Paulundcouk?a=qtYsPIc6JtA:ZNHj6feQDGs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Paulundcouk?i=qtYsPIc6JtA:ZNHj6feQDGs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Paulundcouk/~4/qtYsPIc6JtA" height="1" width="1"/>]]></content:encoded><description>In WordPress you start off with 2 default types of posts you have the standard posts and you also have pages. For these types of posts WordPress will use different PHP files to display the content, the standard posts will use the single.php file and the pages will use the page.php file. But the problem [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.paulund.co.uk/creating-wordpress-custom-page-templates/feed</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://www.paulund.co.uk/creating-wordpress-custom-page-templates</feedburner:origLink></item></channel></rss>

