| Subcribe via RSS

Improve Your Wordpress with Plugins

August 23rd, 2008 | 3 Comments | Posted in Articles, WWW

WordPress (WP) is great as is, but did you know that you could improve it? Plugins add more to the functionality to your blog. The official plugin directory has a lot, but I will focus on my favorites.

All In One SEO Pack

Blogs are useless unless they have some readers. If you write articles, you should try to optimize them for search engines. This extension has many options, such as changing the home page title and description and changing the format of the titles of various pages.

Google Syntax Highlighter

If you run a coding blog, you need a plugin like this. This one uses JavaScript to highlight code in many different languages. You can see it in use on this site.

NextGEN Gallery

This is a plugin for you artists/photographers. It displays a gallery of images on a page you specify, and contains many admin features such as uploading from a zip file, albums, and roles, so people other than the main admin can modify the gallery.

ShareThis

Social media sites are among the best ways to get a lot of traffic (assuming your server can handle it!). This plugin adds a button to the bottom of each post. Click it, and the users can submit the post to sites like Digg or StumbleUpon, email it, or post it on their own blogs.

WP-SpamFree

Spam is very annoying for blog owners. It adds lots of junk to the moderation queue, and spams your inbox if you have notifications enabled. This extension uses multiple tests to verify that the commenter is human, and does not require an account on another website.

And now you know 5 more methods of making your blog better. Happy blogging!

Tags:

Super-Simple Wordpress RSS Syndication For Your Site

August 21st, 2008 | 4 Comments | Posted in Articles, Code, Computers, Linkification, PHP, WWW

If you’re like me you probably have a blog as well as another site. I have found that an effective way to get vistiors to the blog is to link to it from the main site, assuming that that site is more popular. RSS (Really Simple Syndicate) is a way of syndicating your blog to other areas of the web. It is based on XML and generated automatically by Wordpress.

A PHP RSS parser is MagpieRSS. We will be using it in the following tutorial.

  1. Download the most recent version of MagpieRSS from the above website.
  2. Upload the “rss” folder to your web server.
  3. Next we need to make a PHP include file for displaying the posts. Use the following code
    <?php
    require_once('rss/rss_fetch.inc'); //Include the MagpieRSS include file
    $url = 'http://yoursite.com/blog/?feed=rss2'; //Set a variable containing the URL to your blogs RSS feed
    $rss = fetch_rss($url); //Retrieve the posts
    $items = array_slice($rss->items, 0, 5); //Only show the first 5 posts (the second number can be customized to suit your needs)
    $posts = '';
    foreach ($items as $item) { //Loop through the items
    	$href = $item['link'];
    	$cat = $item['category'];
    	$title = $item['title'];
    	$date = $item['pubdate'];
    	$text = $item['content']['encoded'];
    	$text = preg_replace('/<img [^>]+\/?>/', '[image]', $text); //Replace images with [image]
    	$text = preg_replace('/<\/?[^>]+>/', '', $text); //Get rid of HTML
    	$posts .= "<li><a href=$href>$title</a> <em>".substr($text, 0, 100)."</em></li>"; //Print the current post title linked to the page on your blog, and the first 100 chars of the post
    }
    echo $posts;
    ?>
  4. Now you can include that file into your site wherever you want the feed to appear. Enjoy the free traffic!
Tags: , ,