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
- Convert hex color to RGB values in PHP
- Calculate business days
- How do I make a redirect in PHP?
- How to add elements to an empty array in PHP?
- What do ++ and *+ mean?
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- Undefined function mysql_connect()
- MySQL column count doesn’t match value count at row 1 [closed]
- Matching a space in regex
- Undefined function mysql_connect()
- How can I send an email using PHP?
- Fatal error: Call to undefined function mysql_connect()
- count() parameter must be an array or an object that implements countable in laravel
- Go Back to Previous Page
- How do I check if a string contains a specific word?
- How do I replace part of a string in PHP? [duplicate]
- How to declare a global variable in php?
- How to fix “Headers already sent” error in PHP
- Fatal error: Call to undefined function mysql_connect()
- How to fix ‘Notice: Undefined index:’ in PHP form action
- Loop through an array php
- Deprecated: mysql_connect()
- Where does PHP store the error log? (PHP 5, Apache, FastCGI, and cPanel)
- Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error
- Illegal string offset Warning PHP
- What is PHPSESSID?
- What is the significance of the number, 32767?
- PHP – how to create a newline character?
- How to add a line break within echo in PHP?
- How to read a large file line by line?
- Best way to do multiple constructors in PHP
- How to get URL of current page displayed?
- Undefined variable in functions.php file [closed]
- What are PHP extensions and libraries WP needs and/or uses?
- What is the correct way to use WordPress functions outside WordPress files?
- Allow HTML in excerpt
- How to get WordPress Time Zone setting?
- how to get page id of a page using page slug
- Check if current page is the Blog Page
- How to set and use global variables? Or why not to use them at all
- Sending the reset password link programatically
- How to add product in woocommerce with php code [closed]
- Show all terms of a custom taxonomy?
- How exactly do automatic updates work?
- what is correct way to hook when update post
- How to update custom fields using the wp_insert_post() function?
- How to create custom 401, 403 and 500 error pages?
- Why have on every line
- Most efficient way to add javascript file to specific post and/or pages?
- Running WP Cron on multisite the right way
- Getting only direct child pages in WordPress with get_pages
- the_date() not working
- How do I use WP_query with multiple post IDs?