You can use the following piece of code.
<form action="<?php bloginfo('url'); ?>" method="get">
<?php
$select = wp_dropdown_pages(
array(
'post_type' => 'ce_artists',
'show_option_none' => 'Select Artist',
'echo' => 0
)
);
echo str_replace('<select ', '<select onchange="this.form.submit()" ', $select);
?>
</form>
You can find a similar example here in the codex
Related Posts:
- Select dropdown not showing selected value php
- How to make drop down post title
- Filter Select results based on selection
- HTML dropdown setting not showing last saved value in the database
- Sorting dynamic select/dropdown for Contact Form 7 of Modern Tribe Events posts
- Custom Taxonomy Select Menu: Setting default option value?
- How to set value selected using select2 jquery plugin
- How to make a pagination with dropdown selection?
- Open WordPress Page from selected option dropdown
- MySQL “Or” Condition
- How to correctly submit a search form and display the result in an independent page
- Drop down+sort blog posts date added/most popular
- Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
- How do I create a drop down menu in a widget?
- Second select list values are not saved after clicking update
- Replacing the NavWalker dropdown element
- Custom widget using get_categories select menu dropdown
- Archive dropdown styling not applied
- Getting the dropdown menu to redirect to different pages?
- how to save selection meta data in user profile on frontend
- Multiple options not staying selected after saving
- Custom profile field with birthday. Troubles with
- How to pick the default selected value in wordpress dropdown?
- Long running queries
- how to save selected option in variable for rest api category filter
- Display parent and child taxonomies in separate drop down select fields
- How to convert select to HTML with PHP tags inside of it [closed]
- add onchange to select in a wp form
- Isotope Drop Down Categories Filter Function
- Why can’t I return a value from $wpdb->get var?
- How to use wp_nav_menu to create custom dropdown menu?
- Save the value of a wp_dropdown_pages
- Add a select-option to the default widgets
- go to home page when i select default in select-box
- Compare current post Category in select menu
- Database SQL query error
- Dropdown category field inside repeatable metabox
- Reload page with a different shortcode when a user selects from a dropdown
- Echo Option Value Based On WordPress User Role
- PHP drop down menu for my get_category child of
- dropdown with no submit
- custom field meta-box with dropdown/autocomplete
- Page 2+ of taxonomy archives does not recognise sort-order from dropdown
- Save data of select list after clicking save
- AJAX with Selectbox Plugins (Select2, Chosen, Selectize)
- Dropdown Menu for Query_Posts
- Contact form with dynamic dropdown and filter
- Get meta_id along with meta_key and meta_value
- Show content if parent page has children
- Detection of theme being used
- How to order posts by modified date without using ‘query_posts’?
- Get widget settings function?
- Mysterious HTTP 404 header in my own scripts
- How to make custom total price reactive in navigation
- Adding tawk.to code just before body tag on functions.php file
- Custom php page outside the scope of my theme
- Implement toggle switch for theme options in settings API
- Show comments menu in dashboard only if the site has comment
- Creating a Multi-Level Associative Object Using AJAX
- Create WP_Query to search for posts by their categories or their parent/child categories
- My custom wp-admin php files stopped working
- Get page that displays all children of taxonomy parent
- How WordPress reacts to a lack of memory of the server [closed]
- PhantomJS with wordpress
- My new button is in the wrong place
- Why does abstracting html from plugin code result in loss of access to wordpress functions?
- Show a different code on front page to other pages
- WordPress wp_add_inline_style unable to give hex colors?
- Parse error: syntax error, unexpected end of file
- How would I use this filter to change the output of the date format to “Twitter time”?
- WP Business Directory Manager Plugin Admin Listings?
- How to append to an array and return the results in a filter?
- Generating rel=”prev” and rel=”next” using filters
- Why i can’t get custom fields value or post ID via Ajax?
- Fatal errors to undefined function in theme 404.php file [closed]
- the_meta – no get_the_meta query?
- Get value from db for custom contact form
- how to insert content into my taxonomy
- Uncaught TypeError: extract(): Argument #1 ($array) must be of type array, null given
- add_action in namespace not working
- Using a new WP_Query inside the loop
- How to Send Pingbacks for all Posts in WordPress?
- Has a PHP update given me a 404?
- Replace background image with post thumbnail in shortcode
- Using A PHP App in WordPress
- Rewrite rule not working, but only when parameter is text
- How to prevent adding data to a localhost database after refresh?
- wp_ajax_ 400 Bad Request
- How to display sticky post always at the top (before regular post) in wordpress?
- PHP warning with code for nav menu walker [duplicate]
- Showing wordpress latest post thumbnails in slider with auto increment
- media_handle_upload fails with gravity form submitted image
- how to display woocomerce description of each category in wordpress? [closed]
- My function echos only “array”
- Notify admin (by email) if post added with specific tag
- uploading a new theme to live server
- See output of a sql query while plugin installation in wordpress
- Shortcode Display From WordPress Dashboard Page Without Using post_id
- Warning: preg_replace(): Compilation failed: unknown option bit(s) set at offset -1
- Null value given when confirming email’s