Hide Number of Comments if None in WordPress

Just a quick one to tidy up your blog a little and make it a little less negative! It’s quite common to see a list of posts on a WordPress blog with meta info underneath each one displaying things like Post Time, Post Category, Author and the number of Comments the article has. For smaller blogs, there probably wont be too many comments left so you’ll see “No Comments” or “0 Comments” under a lot of the posts. I’ve always thought this looked a little sad on my own blog. Like, here I am slaving away on these excellent and informative articles and no one is reading or commenting on them!? Here’s a quick code edit to hide the “No Comments” text if there are none but show the number of comments and link to them if there are any.

Open the index.php file for your theme in a HTML editor and look for a line similar to this:

<?php comments_popup_link(‘0 Comments’, ‘1 Comment’, ‘% Comments ‘); ?>

Change this to:

<?php comments_popup_link(”, ‘1 Comment’, ‘% Comments ‘); ?>

You’re just deleting any text that should be displayed when there are no comments so if there are none, then nothing will be shown. Geddit!?

You might need to edit this line in several other template files also such as Archive.php, Category.php, Search.php, Tag.php and anywhere else comment numbers are displayed.

Leon.

Batch Upload to Dropbox via WordPress

I’m currently building a site for a local Pharmacy who would like to have the ability to allow customers to upload photos to be developed via an online form on their site. The catch is, they would prefer to have the files go to their Dropbox (File sharing/storage site) folder for easy processing. I done some searching for an off the shelf WordPress plugin and this one came closest but unfortunately, didn’t have batch capability and seems slightly buggy – WordPress.org/extend/plugins/dropbox-plugin.

I then got to wondering if it was possible to Email pics to Dropbox and found a few sites/apps that can do it well. This one seemed best – SendToDropbox.com.

So, armed with the above knowledge, here’s what I done:

Contact Form 7

This is one of the most popular FREE form plugins for wordpress and the current version includes the ability to add File Upload fields to a form. As many as you want. I setup a new form with standard questions like Name, Email, etc..and included a few upload file fields with specifications as to File Type, File Size, etc.. I then pasted in the automatically generated email address from SendToDropbox.com in the “To” field. Contact Form 7 also has the option to send the results of the form submission to a second email address and I setup a duplicate of the first email to go to the proper contact email address of the website, minus the file attachments, just so the website admin would get notification of newly uploaded files. Of course, the Dropbox PC software also alerts you straight away when new files are added to your folder. See below for Contact Form 7 settings:

Contact Form 7

SendToDropBox.com

This is a simple but cool site that connects to your Dropbox account and provides a custom email address that you can send emails and file attachments to. It also has a copule of extra features that process emails received such as: Automatic Unzipping, Email Content Inclusion and control over Dropbox Folder Names/Trees for emailed files, ie – files uploaded in this way can be added to folders named by Date, Email Address, Subject, etc..handy for keeping thigs organised and finding customers uploaded files! See below:

Send To Dropbox

Result

The end result is a normal looking contact form on the customers site that allows basic personal info to be uploaded to Dropbox along with files and photos. The website admin gets instant notification of new files added to his Dropbox account as well as email notifaction of the customer’s details. Nice!

Of course, it can be even simpler. If you just add an email address to the site like Upload@SiteName.com and have that forward on to the custom SendToDropbox email address then people can use the methods they already know for sending emails and attaching files and it will work just as good. I personally think it’s best and more professional to use the form method but perhaps a choice can be given.

Leon.

Identifying WordPress Spam Comments

WordPress users will know that there’s a default spam plugin called Akismet included that is fairly effective for automatically identifying and dealing with spam. If you’ve got comments turned on for your blog posts or pages then you’ll occasionaly get email notification of new comments which you must either Approve, Mark as spam or Trash and links will be provided in the email for each option.

There’s a new breed of spam that escapes filters like Akismet and appears to be a bit more real than traditional spam, ie – no mention of viagra or no funny email or web addresses with foreign lettering. They look and read like a manually created comment by a real person and probably are actually created in this way. Typically they take the form of complimentary comments about your content. Here’s one I got today for example:

“I loved this post. Very informative.”

The commenter added this web address – http://articledominance.com/freereport.html which appears to be a get rich quick offer/site asking for your email address and name, possibly to spam you some more!

My basic, common sense advice when you get comment notifications from your blog is to have a quick look at the commenter’s url/website and see if it looks legit. Also see if the commenter’s text is generic or actually relates specifically to something you’ve said in your post. As another general rule of thumb, if the comment doesn’t contribute anything interesting, related or useful to the discussion on your article then I’d delete it.

Here’s a few things, specifically to do with the commenter’s website that I would delete or mark a comment as spam for:

  • Overselling something,
  • Get rich quick content,
  • Asking for signups/email addresses,
  • Advert heavy sites,
  • Sites with tons of Google adverts,
  • Completely unrelated site.

Leon.

External/Affiliate Link and Download Tracking in WordPress

I write reviews on my WordPress blog here and obviously link to the website of the product or service I’m reviewing and it recently occurred to me that it might be handy to know exactly how many people I’m sending to these websites for free! I tried manually adding tracking to links in articles but that’s a bit tiresome. I tried one or 2 other plugins also but nothing has worked as well as the Google Analyticator plugin by Ronald Heft. Continue reading External/Affiliate Link and Download Tracking in WordPress

WordPress Visual Manual

In addition to the many WordPress Video Tutorials I have on this Blog, I’d like to provide a simple, downloadable and printable PDF instruction manual on how to do some of the most common and basic things in WordPress. The PDF is a series of 12 annotated screenshots from version 2.9.1 of WordPress which is the latest version at the time of writing this article.

Download the WordPress Manual PDF

Get the Free Adobe Reader to view this PDF if you havn’t already.

WordPress and Realex Integration

I am very pleased to announce that proper Credit Card and Laser transactions using Realex processing can now be taken on WordPress powered sites via the Shopping Cart plugin from Tribulant. I think this is a significant development considering both the recent popularity of WordPress as a full website content management and E-commerce system and the position Realex occupies as one of the world’s most popular credit card processors. I am also glad to have personally initiated, advised and funded the integration.