Title: Drop-Down Post List Plugin duplicate posts
Last modified: August 19, 2016

---

# Drop-Down Post List Plugin duplicate posts

 *  Resolved [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [16 years ago](https://wordpress.org/support/topic/drop-down-post-list-plugin-duplicate-posts/)
 * I’m using v1.33 of this plugin on WordPress 2.9.2 to create a dropdown “jump”
   list of recent blog posts in my sidebar:
 * [http://www.dagondesign.com/articles/drop-down-post-list-plugin-for-wordpress/](http://www.dagondesign.com/articles/drop-down-post-list-plugin-for-wordpress/)
 * It appears that, when a post is filed under more than one category, it will appear
   in the dropdown’s list once for each category. Has anyone else had this issue
   or encountered a fix?
 * I don’t know much about PHP or SQL, but I’m guessing there’s something amiss 
   with this part of the code (lines 238-256 in `dd-drop-down-post-list.php`):
 *     ```
       $cat_sel_code = ' ';
       		if (!$all_cats) {
       			$cat_sel_code = " AND {$table_prefix}term_taxonomy.term_id = {$catID} ";
       		}
   
       		$post_list = (array)$wpdb->get_results("
       			SELECT ID,
       				post_title,
       				post_date
       			FROM {$table_prefix}posts, {$table_prefix}term_relationships, {$table_prefix}term_taxonomy
       			WHERE {$table_prefix}posts.ID = {$table_prefix}term_relationships.object_id
       			AND {$table_prefix}term_relationships.term_taxonomy_id = {$table_prefix}term_taxonomy.term_taxonomy_id
       			AND {$table_prefix}term_taxonomy.taxonomy = 'category'
       			{$cat_sel_code}
       			AND post_status = 'publish'
       			AND post_type != 'page'
       			{$sort_code}
       			{$limit_code}
       		");
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [16 years ago](https://wordpress.org/support/topic/drop-down-post-list-plugin-duplicate-posts/#post-1521451)
 * Since I have this plugin set to display all categories, I was able to fix this
   problem by deleting the category selection code entirely. The replacement for
   the aforementioned code block is
 *     ```
       $cat_sel_code = ' ';
       		if (!$all_cats) {
       			$cat_sel_code = " AND {$table_prefix}term_taxonomy.term_id = {$catID} ";
       		}
   
       		$post_list = (array)$wpdb->get_results("
       			SELECT ID,
       				post_title,
       				post_date
       			FROM {$table_prefix}posts WHERE post_status = 'publish'
       			AND post_type != 'page'
       			{$sort_code}
       			{$limit_code}
       		");
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Drop-Down Post List Plugin duplicate posts’ is closed to new replies.

## Tags

 * [dagon design](https://wordpress.org/support/topic-tag/dagon-design/)
 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)

 * 1 reply
 * 1 participant
 * Last reply from: [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/drop-down-post-list-plugin-duplicate-posts/#post-1521451)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
