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