WordPress Related

WordPress tips, ideas and programming tutorials to help you get your website started right.

My 5 Favourite WordPress Plugins

WordPress has become a major player in the world of website content management. Used as the platform of choice by hundreds of thousands of websites, it really has improved the ease by which new webmasters and grizzled Internet veterans alike are now able to deploy their latest creations online.

I use it as the Content Management System of choice on most of my sites and blogs and one of it’s key features is the ability to extend the codebase beyond it’s original abilities. These changes are made through plugins, and there are a number of plugins that I tend to use on a regular basis on my WordPress sites. This is a list of my favourite WordPress plugins. Read the rest of this entry »

Steps to Keep WordPress Secure

It has been brought to my attention that WordPress is becoming a juicy target for hackers and bot-nets.  As such, here are some simple steps you can take to prevent your WordPress site from being hacked.

  • Change your admin password regularly.
    One strategy that hackers are using is simple brute-force attacks to try and guess your password.  You should change it regularly, and make sure the password you choose is very hard to guess.  Long combinations of letters, numbers and symbols are best.  Sentences can be good too.  Consider using a password storage solution such as LastPass.
  • Install a plugin to block bad logins.
    There are a number of plugins out there which can lock user accounts if too many bad login attempts are detected.  Installing one of these would be a good security measure. Read the rest of this entry »

AmazonFeed 2.1 Released

I have finally released AmazonFeed v. 2.1. While not a major release, it updates the code to be compatible with WordPress 3.1.1 and fixes a few minor bugs. One bug for example would prevent your custom Amazon tags from being saved in certain situations. This has now been fixed. Hope you enjoy the plugin. If you have questions or comments, feel free to leave them in the comments associated with this post.

Beware of Thieves like AmazonPress

I was recently made aware of a couple of plugin thieves who have taken my code, rebranded it as their own (calling it AmazonPress), redirected the tip to themselves, and made it mandatory rather than optional with no notice to the website owner. In my opinion this constitutes theft from both myself as well as their clients/victims. By not giving credit to me as the original author they are also in violation of the terms of the GPL.

From their site: “We have been online for about 4 years now, we decided to jump in and create an open source plugin for wordpress, it seems there is a need for an amazon plugin that actually works properly, so we decided to go ahead and develop one. Soon to come we will be creating new and awesome plugins.”

If you’re a plugin developer, you better watch out because they might be “creating” your plugin next! If you already use their plugin, you may want to consider another option as they are stealing your commissions without your knowledge or consent. May I recommend the original AmazonFeed?

AmazonFeed v1.9 Released

I’m happy to announce I have completed work on AmazonFeed v. 1.9.  This version includes some very cool features including:

  • Ability to sort the order in which products appear sitewide we well as customizing the sort order on individual posts.
  • Ability to choose where the products appear on the posts/pages, whether below (default) or above the post content.
  • Ability to choose whether or not specific products are displayed in association with individual keywords.  You can block specific products on the cache control page.

Hope you like this new version.  You can download it from WordPress.org.  I’d love to hear your thoughts in the comments area below.

Secondary WordPress Loops

In coding WordPress plugins and themes, I have often found it necessary to create secondary WordPress loops in the code to show a list of articles or posts on the site that wouldn’t normally appear on the page used to display them. For example, on the homepage of this site, I list articles from three different blog categories in three different lists. The way in which this is accomplished is relatively simple and straightforward.

First, you have to create a new instance of the WP_Query object from WordPress. Due to some complications with the WordPress code, you will need to store the original $wp_query variable in a $temp variable, and override it with your own.  You would do this with something like the following code:

<?php 
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query(); 
?>

This constructs a new WP Query object for you which you can then use for subsequent calls in the loop.  Once you’ve constructed this object, you will want to define your query variables and run your query.

<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$query = 'cat=5&paged=' . $paged;    // Query to pull posts from category ID 5
$wp_query->query($query);  // Run the query on the $newposts object.
?>

Now that you have retrieved the necessary posts from your blog, you can begin your secondary loop.  The format is slightly different however, in that you should run the have_posts() methods on the new object, rather than as WP functions as is seen below.

<?php
if ($wp_query->have_posts()) :
  while ($wp_query->have_posts()) :
    $wp_query->the_post();
?>

… regular loop style WP code such as…

<li>
  <a href="<?php the_permalink() ?>" rel="bookmark"
     title="Permanent Link to <?php the_title(); ?>"
     ><?php the_title(); ?></a>
</li>

… then close the loop.

<?php endwhile; endif; ?>

If necessary you can also add paging controls with the following:

<div class='navigation'>
  <div class='alignleft'>
    <?php next_posts_link('&laquo; Older Entries') ?>
  </div>
  <div class='alignright'>
    <?php previous_posts_link('Newer Entries &raquo;') ?>
  </div>
</div>

Finally, you need to restore the original $wp_query variable with what you stored in $temp.

<?php $wp_query = null; $wp_query = $temp; ?>

I’d love to hear your feedback on this or if you have any suggestions to improve it.  Feel free to comment.

AmazonFeed Security Updates

I am happy to announce that I have upgraded AmazonFeed to support the new Amazon security requirements coming into place on Aug. 15’th.  If you are currently using AmazonFeed v. 1.3 or lower, you will want to upgrade to 1.4 or higher before Aug. 15, in order to continue displaying Amazon products on your site using this plugin.

You can read more about or download AmazonFeed on this page.

Link Directory Plugin Work

Lately I’ve been spending a lot of late evenings working on a new WordPress plugin called “Link Directory”. Essentially it will allow the blog owner to run a link directory/portal on their WordPress blog without too much management headache. Though I am still working out the rough spots, I already have it running here on this blog, replacing the old LinkDirectory hack I had built. Feel free to browse around or suggest other links/categories.

I’ve posted some screenshots of the administrative interface below.  I would love to hear some feedback on it as well as any suggestions you might have.  Feel free to post thoughts below.

Administrative Screenshots:

Administrative Dashboard

Administrative Dashboard

Administrative Sub-Category View

Administrative Sub-Category View

As mentioned above, I would love to hear any thoughts, suggestions or feature requests you might have. Feel free to post them here.

Is AmazonFeed Making You Money?

Just for fun, we thought we’d run a poll to find out how helpful AmazonFeed has been to you and your website.  So, feel free to rate your success with it below.

Has our AmazonFeed plugin helped you make money with your site? If so, how much?
View Results

WordPress Plugin: Related Products from Amazon.com

This plugin will allow you to make money on your website as an Amazon.com affiliate.  It enables you to automatically advertise products from Amazon.com which are specifically related to the topic you are writing about.

Features:

  • Automatically load category or tag related products from Amazon.com.
  • Earn rewards as an affiliate, simply by entering your affiliate tracking code.
  • Provide valuable additional content to your visitors on the topics of your posts.
  • Total control to tailor results for any given post.
  • Excellent content caching for lightning fast response times.
  • Ability to disable related products from being displayed at all on any given post.
  • NOT JavaScript based, meaning it is not hidden from users with no JavaScript capability.

Read the rest of this entry »

Next Page »