How to Set post expiration date/time on your WordPress blog »

Do you regret that WordPress haven’t a feature to publish a post during only 2 days, or one week? Here is a very nice code that you can use in your WordPress theme, to enable the possibility of creating post expiration based on date and time. Edit your theme and replace your current WordPress loop ...

Unique different admin and theme languages on your WordPress »

Simply set the desired locale (on line 6) then add the code to your functions.php file.

Increase mobile visitors on your WordPress blog »

Once done, simply open your header.php file and place the following at the top of the file. Don’t forget to edit line 5 according to the page where you’d like to redirect mobile users. include('mobile_device_detect.php'); $mobile = mobile_device_detect(); if ($mobile==true) { header( 'Location: http://your-website.com/?theme=Your_Mobile_Theme' ) ; }

Automatically insert a list of related articles below the post »

First, paste the code below into the functions.php file from your theme. // "More from This Category" list by Barış Ünver @ Wptuts+ function wptuts_more_from_cat( $title = "More From This Category:" ) { global $post; // We should get the first category of the post $categories = get_the_category( $post->ID ); $first_cat = $categories[0]->cat_ID; // Let's ...

Easily make WordPress images responsive »

Open your functions.php file and paste the following code in it: function responsive_images($atts, $content = null) { return ' ' . $content .' '; } add_shortcode('responsive', 'responsive_images'); Once done, open your style.css file and add those CSS rules: @media only screen and (max-width:767px) { .image-resized img { width:100%; height:auto; } }