diff --git a/functions/relatedcomics.php b/functions/relatedcomics.php deleted file mode 100644 index 523de6d..0000000 --- a/functions/relatedcomics.php +++ /dev/null @@ -1,73 +0,0 @@ - '5', - ), $atts)); - - global $wpdb, $post, $table_prefix, $category_tree; - - if ($post->ID) { - // Get tags - $tags = wp_get_post_tags($post->ID); - $tagsarray = array(); - foreach ($tags as $tag) { - $tagsarray[] = $tag->term_id; - } - $tagslist = implode(',', $tagsarray); - if (empty($tagslist)) return; - if (empty($limit)) $limit = 5; - // Do the query - $q = "SELECT p.*, count(tr.object_id) as count - FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID - AND p.post_status = 'publish' - AND p.post_date_gmt < NOW() - GROUP BY tr.object_id - ORDER BY count DESC, p.post_date_gmt DESC - LIMIT $limit;"; - - $related = $wpdb->get_results($q); - if ( $related ) { - $retval = ' -
'; - return $retval; - } - return; -} -// add_shortcode('related_comics', 'related_comics_shortcode'); - -?> - -*/ diff --git a/functions/relatedposts.php b/functions/relatedposts.php deleted file mode 100644 index 5fd179c..0000000 --- a/functions/relatedposts.php +++ /dev/null @@ -1,74 +0,0 @@ - '5', - ), $atts)); - - global $wpdb, $post, $table_prefix, $category_tree; - - if ($post->ID) { - // Get tags - $tags = wp_get_post_tags($post->ID); - $tagsarray = array(); - foreach ($tags as $tag) { - $tagsarray[] = $tag->term_id; - } - $tagslist = implode(',', $tagsarray); - if (empty($tagslist)) return; - if (empty($limit)) $limit = 5; - // Do the query - $q = "SELECT p.*, count(tr.object_id) as count - FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p WHERE tt.taxonomy ='post_tag' AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID AND tt.term_id IN ($tagslist) AND p.ID != $post->ID - AND p.post_status = 'publish' - AND p.post_date_gmt < NOW() - GROUP BY tr.object_id - ORDER BY count DESC, p.post_date_gmt DESC - LIMIT $limit;"; - - $related = $wpdb->get_results($q); - - if ( $related ) { - $retval = ' - '; - return $retval; - } - return; -} - -// add_shortcode('related_posts', 'related_posts_shortcode'); - -?>*/