Title: dropdown_cats
Published: April 25, 2014
Last modified: August 20, 2026

---

# dropdown_cats( int $optionall = 1, string $all = 'All', string $orderby = 'ID', string $order = 'asc', int $show_last_update, int $show_count, int $hide_empty = 1, bool $optionnone = false, int $selected, int $exclude ): string

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#wp--skip-link--target)

This function has been deprecated since 2.1.0. Use [wp_dropdown_categories()](https://developer.wordpress.org/reference/functions/wp_dropdown_categories/)
instead.

Deprecated method for generating a drop-down of categories.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#see-also)󠁿

 * [wp_dropdown_categories()](https://developer.wordpress.org/reference/functions/wp_dropdown_categories/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#parameters)󠁿

 `$optionall`intoptional

Default:`1`

`$all`stringoptional

Default:`'All'`

`$orderby`stringoptional

Default:`'ID'`

`$order`stringoptional

Default:`'asc'`

`$show_last_update`intrequired

`$show_count`intrequired

`$hide_empty`intoptional

Default:`1`

`$optionnone`booloptional

Default:`false`

`$selected`intrequired

`$exclude`intrequired

## 󠀁[Return](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#return)󠁿

 string

## 󠀁[Source](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#source)󠁿

    ```php
    function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
    		$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
    		$selected = 0, $exclude = 0) {
    	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_dropdown_categories()' );

    	$show_option_all = '';
    	if ( $optionall )
    		$show_option_all = $all;

    	$show_option_none = '';
    	if ( $optionnone )
    		$show_option_none = _x( 'None', 'Categories dropdown (show_option_none parameter)' );

    	$vars = compact('show_option_all', 'show_option_none', 'orderby', 'order',
    					'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude');
    	$query = add_query_arg($vars, '');
    	return wp_dropdown_categories($query);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/deprecated.php#L699)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/deprecated.php#L699-L716)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_dropdown_categories()](https://developer.wordpress.org/reference/functions/wp_dropdown_categories/)`wp-includes/category-template.php` |

Displays or retrieves the HTML dropdown list of categories.

  | 
| [_x()](https://developer.wordpress.org/reference/functions/_x/)`wp-includes/l10n.php` |

Retrieves translated string with gettext context.

  | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  | 
| [add_query_arg()](https://developer.wordpress.org/reference/functions/add_query_arg/)`wp-includes/functions.php` |

Retrieves a modified URL query string.

  |

[Show 2 more](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/dropdown_cats/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.1.0](https://developer.wordpress.org/reference/since/2.1.0/) | Deprecated. Use [wp_dropdown_categories()](https://developer.wordpress.org/reference/functions/wp_dropdown_categories/)  | 
| [0.71](https://developer.wordpress.org/reference/since/0.71/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fdropdown_cats%2F)
before being able to contribute a note or feedback.