Index: functions.php
===================================================================
--- functions.php	(revision 2808)
+++ functions.php	(working copy)
@@ -247,7 +247,7 @@
 			// Substitute the substring matches into the query.
 			eval("\$query = \"$query\";");
 			$query = new WP_Query($query);
-			if ( $query->is_post || $query->is_page )
+			if ( $query->is_single || $query->is_page )
 				return $query->post->ID;
 			else
 				return 0;
