Updated: February 2nd, 2011
WordPress has a great way of letting you use simple text tags called shortcodes to provide a whole bunch of functionality, including custom PHP code. In this article, I'm assuming that you already know what shortcodes do and how they operate (if you don't, head over here: Shortcode_API).
One glaring omission in the way shortcodes are set up by default is that they only get triggered in the content of your post, leaving the sidebar and comments out. I'm sure this is done for security, so that your readers can't screw something up by posting shortcodes they're not supposed to – after all, shortcodes are PHP snippets on the backend.
However, let's assume you really know what you're doing …
Updated: September 16th, 2012
If your WordPress comment counts got messed up, whether because of a plugin (I'm talking about you, DISQUS) or you messed with your database manually and did something wrong (yup, that's what I just did), fear not – I have a solution for you.
But first, a little background.
Comment Counts In WordPress
Here's how comment counts work in WP:
- Posts live in a table called wp_posts and each has an ID.
- Comments reside in a table called wp_comments, each referring to an ID in wp_posts.
- However, to make queries faster, the comment count is also cached in the wp_posts table, rather than getting calculated on every page load.
If this count ever gets out of sync with
Updated: January 25th, 2010
If you follow web design at all, you probably see 5 billion top NN posts on a daily basis mentioning site and blog designs, fonts, icons, etc.
However, nobody seems to be paying attention to these little but important guys: comment forms.
If you have an appealing comment box, you are more likely to receive comments (this is based on days of scientific research that I imagined I did in my head) and your content is more likely to be re-shared, voted up, and saved.
I really do feel that way when I visit blogs, especially when an otherwise aesthetically pleasing site has a plain vanilla comment box.
So here we go. I have looked through hundreds …
Ever since the introduction of the official Retweet button, I've wanted it to be a little more interactive. I usually want to add my 2 cents into the tweet I'm about to retweet but the default RT button just doesn't allow for it – Yes is the only option:
Troy's Twitter Script
Troy's script added the RT button to my stream (along with inline picture and video embed, auto url expander and shortener, name autocomplete, and other things) way before Twitter introduced it.
It also allowed me to add a couple of words or rephrase the retweet to make it more relevant to my followers….