Archive for the ‘WordPress Tutorials’ Category

Optimizing WordPress Permalinks

Configuring your WordPress permalinks is simple and only takes a second, but understanding what they are and how they work is key to setting up the best permalink structure possible. Your site’s permalinks are like the street address for your…

How to display your average feed readers

As usual, the first thing to do is to paste the function in your functions.php file:

function get_average_readers($feed_id,$interval = 7){
	$today = date('Y-m-d', strtotime("now"));
	$ago = date('Y-m-d', strtotime("-".$interval." days"));
	$feed_url="https://feedburner.google.com/api/awareness
/1.0/GetFeedData?uri=".$feed_id."&dates=".$ago.",".$today;
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, $feed_url);

How to easily enable/disable debug mode in WordPress

The first thing to do is to add the following code to your wp-config.php file. This file is located at the root of your WordPress install.

if ( isset($_GET['debug']) && $_GET['debug'] == 'debug')
  define('WP_DEBUG', true);

Once done, simply add a…

WordPress tip: Insert custom content after each post

You just have to paste the following code into your functions.php and save the file. Once done, custom content will be inserted below each of your posts.

function add_post_content($content) {
	if(!is_feed() && !is_home()) {
	$content .= '<p>This article is copyright

Next/Previous Post Navigation Outside of the WordPress Loop

WordPress provides several navigational template tags to make it easy for visitors to surf your pages. There are basically two different types of template tags used for chronological post navigation:

  • posts_nav_link()

WordPress Custom functions.php Template, Part 2

In a recent post, we show you how to clean up and enhance the functionality of WordPress with a custom functions.php template. In that post, we explain how using a custom…

10 New Plugins for WordPress 3.0

WordPress Plugins

Meteor Slides

Meteor Slides makes it simple to manage a slide show with WordPress by adding a custom post type for slides. The slides are managed as featured images through the media library; they will automatically be cropped to…

WordPress hack: Use includes in your posts or pages

The first step is to paste the following code in your function.php file:

function digwp_includeContentShortcode($atts) {

  $thepostid = intval($atts[postidparam]);
  $output = '';

  query_posts("p=$thepostid&post_type=page");
  if (have_posts()) : while (have_posts()) : the_post();
    $output .= get_the_content($post->ID);
  endwhile; else:
    // failed, output nothing
  endif;

Display dates as “time ago”, the easy way

To display human readable dates on your blog, you have to use the human_time_diff() function. The following piece of code will show a post date like “Posted 6 days ago”.
Paste it anywhere within the loop, save the file,…

Custom Page Titles from Scratch

The titles of pages are controlled by the <title> tag in the <head> section of a website. They are important for all kinds of reasons. Telling the user where they are. The name of the page when bookmarked both locally…