How to: optimize wordpress blog for speedy loading

February 21, 2012 at 1:25 am | Posted in Wordpress | Leave a comment
Tags: , ,

When Google introduced the loading time of a website in their ranking algorithm – everyone became obsessed with minimizing the time the content on the site is properly shown to a reader.  As a WordPress user – for quite a few years now I have heard over and over again how important it was to keep the amount of plugins and widgets that load content from 3rd parties at a minimum.

Social sharing without plugins or java script

One of the plugin most frequently used across the web is the one that generates the shiny social media buttons that encourage readers to share the article on one of the dozen networks out there . Those buttons are almost always integrated on the plug with a help of a plugin or an external java script file – thus one more thing that your readers have to load each time when they access a page or an article where these buttons are placed . I wanted something more cleaner – a simple image ( there are variety of beautiful icon sets  on the web )  and a link to send the articles to the social medias.

I found some interesting tutorials on the web and after reading several here is the solution I cam out with :

For Twitter :

<a href="http://twitter.com/home?status=%20%3C?%3Cspan%20class=">php the_title(); ?&gt; ?php the_permalink(); ? @Your Twitter Handle" title="Click to send this page to Twitter!" target="_blank" rel="nofollow"&gt;<img style="border-style: none;" src="Image%20URL%20Goes%20here" alt="Send to Twitter" /></a>

For Facebook

<a href="http://www.facebook.com/share.%3Cspan%20class=">php?u=<!--?php the_permalink(); ?-->&amp;title=<!--?php the_title(); ?-->" target="_blank" rel="nofollow" &gt;<img style="border-style: none;" src="Image%20URL%20goes%20here" alt="Send to Facebook" /></a>

For the other social networks the code is quite similar – just make sure you have the correct URL for :

My Space

http://www.myspace.com/Modules/PostTo/Pages/?u=<!--?php the_permalink(); ?-->&amp;t=<!--?php the_title(); ?-->

Stumble Upon

http://www.stumbleupon.com/submit?url=<!--?php the_permalink(); ?-->&amp;title=<!--?php the_title(); ?-->

Digg

http://www.digg.com/submit?phase=2&amp;url=<!--?php the_permalink(); ?-->&amp;title=<!--?php the_title(); ?-->

If you need more examples visit this list at Pageafairs .com – b8ut remember that you have to use the WordPress custom PHP tags for the address of your article  and for the title

I have used this method to set sharing buttons on the articles on TheSkyKid.com . You would like to put these codes somewhere in the single.php file of your template which is the one that outputs your articles .

Page navigation using the build in WordPress functionality instead of a plugin

I spend quite a lot of time looking for a way to have page navigation without the need to use a plugin. I used ” Numbered Pagination Without a Plugin ” as a search term on Google and and found several web sites (1)(2) that suggested methods that involved  editing  the theme`s functions.php file – which never had any good results for me. Finally I managed to find good working solution on the Cats who code web blog . It is the following code :

<?php
global $wp_query;

$big = 999999999; // need an unlikely integer

echo paginate_links( array(
	'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
	'format' => '?paged=%#%',
	'current' => max( 1, get_query_var('paged') ),
	'total' => $wp_query->max_num_pages
) );
?>

 - coming straight from WordPress.org own codex . You may want to insert the code in your authors.php , archives.php and search.php and index.php files as appropriate . When I find out that method I
disabled the WP- Page Navi plugin I used until recently . I don`t have much knowledge of CSS as to make the display prettier – but if I found out how this can be achieved I will make sure to update this post.

Speed up your site with .htaccess caching

Another code that I found at Cats Who Code ( tested and proven working )

Paste the following into your.htaccess file.

# 1 YEAR
<FilesMatch ".(ico|pdf|flv)$">
Header set Cache-Control "max-age=29030400, public"

# 1 WEEK
<filesmatch ".(jpg|jpeg|png|gif|swf)$"="">
Header set Cache-Control "max-age=604800, public"

# 2 DAYS
<filesmatch ".(xml|txt|css|js)$"="">
Header set Cache-Control "max-age=172800, proxy-revalidate"

# 1 MIN
<filesmatch ".(html|htm|php)$"="">
Header set Cache-Control "max-age=60, private, proxy-revalidate"

Do you know other techniques to speed up a Worpress?  Let me know !

Я твой наркотик

February 7, 2012 at 10:04 am | Posted in Music | Leave a comment

Wicked song ( :

Reading a book is like…

January 12, 2012 at 10:21 pm | Posted in Random | 1 Comment
Tags: ,

Reading a book is like...

Pocket Legends – amazing 3D massively multiplayer game

December 27, 2011 at 1:16 am | Posted in Internet | Leave a comment
Tags:

Few days ago I complained that I was not able to find a single game on iOS with a decent multiplier mode build in.  I almost gave up looking – but hey I found one – and what a game it is. The title is Pocket Legends – and is fantasy themed game. One can play it on iOS, Android and even as an app on Google Chrome . I spent the last 6 hours playing ( I know – too much time on my hands ) . I have played it both on my computer and on my Ipod and when you switch the platform the experience is totally different. Playing it on an iPad must be a blast.   Oh and did I mention – it free !

Check it out at : http://pocketlegends.com/

Video recording on Skype

December 27, 2011 at 12:57 am | Posted in Technology and Software | Leave a comment
Tags: ,

supertintin

Skype video chats are fun – and if the quality is decent enough Skype is perfectly suited for conducting video interviews . For that one would need to use a software. Yesterday a friend of mine asked me to recommend him a free program simple enough to be used by everyone. We checked some options – including the trial versions of some paid programs ( VodBurner and Evaer ) – but none worked flawlessly . Yet we got lucky when I stumbled on Supertintin – while the free version of this software is limited to 5 minutes , it worked great just ” out of the box ” .

You can download the software at http://www.supertintin.com/

Do you know any other free Skype video recorder ?  Let me know !

 

Skaterz : The Twins

December 25, 2011 at 1:40 am | Posted in Random | Leave a comment
Tags:

Stumbled upon this amazing clip on Vimeo. Not only the kids rock those skates , but the camerawork is cool too – love the situate scenes at the begging. I have never learned to Skate – had a Skate one and tried inspired by movies and clips just like this one – but what seemed easy on films was not as easy in practice. So I learned some trick with the bike insted ( :

Next Page »

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.