You’ll need to use get_posts
and roll your own drop down.
Something like this (somewhere in functions.php
):
<?php
function wpse34320_type_dropdown( $post_type )
{
$posts = get_posts(
array(
'post_type' => $post_type,
'numberposts' => -1
)
);
if( ! $posts ) return;
$out="<select id="wpse34320_select"><option>Select a Doctor</option>";
foreach( $posts as $p )
{
$out .= '<option value="' . get_permalink( $p ) . '">' . esc_html( $p->post_title ) . '</option>';
}
$out .= '</select>';
return $out;
}
Then in your template…
<?php echo wpse34320_type_dropdown( 'doctors' ); ?>
Related Posts:
- Remove current_page_parent nav class from blog index when in CPT
- Custom Taxonomy as Dropdown in admin
- WordPress Custom Post Types with a page as a parent?
- How to order adjacent posts (prev / next) by custom field value?
- How to model a hierarchy for courses, levels and lessons?
- wp_dropdown_categories in custom post type with custom taxonomy
- How make get_next_post() return first post when viewing last one
- List custom post types in dropdown
- Problem excluding category from get_next_post
- specify meta_key / meta_value condition for prev_post_link and next_post_link
- Conditional two level dropdown filter for custom post type
- Dynamic dropdown custom post list based on dropdown selection
- Nav menu of all posts in a custom post type
- Set default option in dropdown of WP_Query?
- Full-Ajax Theme: parseJSON error while building a JSON object from a WordPress custom template
- posts_nav_link on single post template
- Highlight nav menu terms
- Custom Taxonomy Breadcrumb Navigation
- Display custom taxonomy as dropdown list
- Filters post in admin with dropdown select, custom post type
- Select menu should display categories and the item’s depth
- Why are navigation items saved in the database?
- adding .current* tags to custom post types and taxonomies
- wp_get_nav_menu_items wp-admin/customize.php problem
- current-menu-item not working with custom post type
- Showing Custom Content in a Nav Dropdown
- Hierarchical Custom Posts – Highlighting Current Post in Sub-Menu
- Custom Post Type Navigation on Custom Field
- Add/Remove current_page_parent class
- Twenty Fifteen: Adjacent posts by menu_order [duplicate]
- How to show cutom post labels in options?
- How can i change the output of posts_nav_link();
- How to convert custom post type based list to a dropdown list?
- Creating a navigation menu of all posts of a custom post type and their children posts?
- Widget: Custom Post Type Post Listing Dropdown on Admin Side
- wordpress wp_list_pages help
- Showing up my custom post type in primary navigation
- Paging doesn’t work?
- Multiple level category drop-down from the WordPress dashboard
- Hide post navigation if current post is in a category with only one post
- Options page – dropdown of users
- How To Show All Custom Post Types In A Category Instead Of Pagination?
- How to make custom taxonomy into drop down select in a custom metabox
- Create a Dropdown from Custom Post Type
- Losing Nav Active State in Menu
- dropdowboxes with pre-selected custom fields optios that filters the results according seach needs
- wp_dropdown_pages doesn’t work with post_type argument
- Custom Post Types in the WordPress Navigation Menu
- How can i automatically add CPT single pages as sub menu items
- How does the ‘the_post_navigation()’ work for CPT’s?
- Page Template Dropdown For Custom Post Types
- Displaying Custom Posts
- echo selected value from dropdown
- Unable to display selected post title in frontend from metabox wp_dropdown_pages()
- List All Custom Post Types Posts in Nav Menu Dynamically
- Add search to ‘Parent’ dropdown
- Set Default Option Value as Blank for Meta Box
- How to selected value default in option list?
- Display Taxonomy Term Children in a Drop Down without Submit Button
- New posts label category with “new”
- Drop down list with posts within the “add new” page
- Select Venue from dropdown list and reuse stored address information in meta_box
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- How to create Custom Taxonomy Search Drop Down for specific Post Type
- Front End Dropdown Showing All Custom Post Type ‘Agent’
- Previous / Next Links For Custom Post Type Sorted By Meta_Value
- Include “Scheduled” (“Future”) Posts in WordPress Post Navigation ( previous_post_link, next_post_link ) for a Specific Custom Post Type
- Create a Dropdown Selector and Redirect for a Custom Taxonomy in WordPress?
- How to get next post link of child custom post type from parent post and get next post link of parent post from the last child post?
- Change dynamically the dropdown list value
- Manually adding current_page_parent to wp_list_pages()
- Prev/Next Navigation on Single Post Disappeared for Custom Post Type
- How to create a Child & Siblings menu for a custom post type?
- current-post-parent for custom post type
- Use output of wp_dropdown_categories($args)
- filter post by date selected in a dropdown in realtime
- Adding a nav menu for a custom post type
- Insert a hash into the url of custom posts to make them function as anchors
- Post navigation doesn’t show (in custom template, custom post type, custom query)
- Changing an item in drop down after 5 latest posts per taxonomy
- Navigation not working for custom post type pages
- wp_nav_menu doesn’t seem to work on custom post type pages
- wp_dropdown_pages doesn’t allow me to select more than one custom post type
- Custom nav menu current item custom link problem
- Dropdown switching subcategories portfolio
- Calling the first & last post by category in custom post type
- Programmatically Split A Post Into Multiple Pages
- How to output the content of a Custom Post Type from a drop down form?
- Display posts order by custom post in a dropdown menu
- next_posts_link returns same content of 1st page
- Custom post type navigation – 404 on page 2
- current_page_item and custom post type?
- Why is Posts page selected when showing single Custom Post Type?
- Navigation links to posts in current term shortcode
- Pagination for Custom Post Type with Multiple Types
- Navigation won’t update to show full path to single post
- get_the_post_navigation not working
- Now can I group custom post types together?
- Function error – Use of undefined constant ‘pre_get_posts’ – assumed ‘‘pre_get_posts’’
- custom home page and custom index page?