# Category Dropdown

**URL:** <https://forum.pinegrow.com/t/category-dropdown/1357>\
**Category:** Pinegrow WP\
**Created:** [November 14, 2017, 10:08am UTC](https://forum.pinegrow.com/t/category-dropdown/1357 "2017-11-14T10:08:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![24degrees](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/24degrees/32/136_2.png) [@24degrees](https://forum.pinegrow.com/u/24degrees)\
**Post date:** [November 14, 2017, 10:08am UTC](https://forum.pinegrow.com/t/category-dropdown/1357/1 "2017-11-14T10:08:45Z")

</div>

Hi all,

in the WordPress Codex, to create a Category dropdown list without the need of a “Go” button, it shows the following code:

- 
## \<?php \_e( 'Posts by Category' ); ?\>

```
	<?php
	$args = array(
		'show_option_none' => __( 'Select category' ),
		'show_count' => 1,
		'orderby' => 'name',
		'echo' => 0,
	);
	?>

	<?php $select = wp_dropdown_categories( $args ); ?>
	<?php $replace = "<select$1 onchange='return this.form.submit()'>"; ?>
	<?php $select = preg_replace( '#<select([^>]*)>#', $replace, $select ); ?>

	<?php echo $select; ?>

	<noscript>
		<input type="submit" value="View" />
	</noscript>

</form>

```

How do I integrate such code in Pinegrow? I know I can just cut and paste it, but that’s not the proper way, I think?

Thanks
