Questions tagged [dropdown]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
51 votes
2 answers
60k views

Any docs for wp_nav_menu's "items_wrap" argument?

I'm using wp_nav_menu and am trying to create custom output for the sub-level drop downs. I came across the "items_wrap" argument but there's really not much information as to what it is, how it ...
user avatar
  • 1,697
22 votes
3 answers
51k views

How to use wp_nav_menu to create a select menu dropdown?

I'm using the following inside the wp_nav_menu function to create a select dropdown menu where each menu item is an option in the select dropdown... 'items_wrap' => '<select>%3$s</select&...
user avatar
9 votes
1 answer
4k views

Taxonomy dropdown metabox in the back-end

I've created custom taxonomy called Brands and made it hierarchical so I can add Car brands and models there and keep their relations, like this: Ford Mustang Mondeo Focus Problem is, this list ...
user avatar
  • 433
8 votes
2 answers
2k views

Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?

Essentially I'm trying to add multiple sub nav menus and I'm pretty close but I just can't seem to find the right tack to solve my problem ... I'm using a variation of a Stu Nichols CSS Menu ... ...
user avatar
6 votes
3 answers
5k views

Removing filter dropdown in posts table (in this case Yoast SEO)

I don’t need Yoast SEO meta box for one post type so I removed it with remove_meta_box(). Removed unneeded columns in post table by unsetting columns with manage_edit-custom_post_columns, but drop ...
user avatar
  • 73
6 votes
1 answer
12k views

Custom Taxonomy as Dropdown in admin

I’ve created a custom post type (called Sponsors) with an additional taxonomy connected to it, called “Type”. Everything is essentially working perfectly but I would very much like to have my ...
user avatar
  • 770
6 votes
1 answer
8k views

Add a dropdown to theme customizer

How can I add a Drop down control to WordPress Theme Customizer and use its value in Theme source? I want to use Drop down value for changing some CSS file names Thank you very much
user avatar
5 votes
1 answer
7k views

restrict_manage_posts not working in 3.3.1

I have noticed my custom taxonomy filters no longer work in the 3.3.1 admin as per these methods: Adding a Taxonomy Filter to Admin List for a Custom Post Type? I also discovered that to filter a ...
user avatar
  • 524
5 votes
2 answers
9k views

wp_dropdown_categories in custom post type with custom taxonomy

I have a custom post type with its own taxonomy, basically 'show venues' is the post type and venue-regions is the taxonomy. Seeing how a venue cant exsist in mutiple regions, I've removed the ...
user avatar
  • 855
4 votes
1 answer
14k views

how to get value of wp_dropdown_categories

I am making a widget and I have used the wp_dropdown_categories() function in that widget. What I can't figure out is how to get the selected value from the dropdown. What variable is the selected ...
user avatar
  • 1,343
4 votes
1 answer
8k views

Filter results with custom field values and dropdown

I need to filter posts by a custom field value. My specific example: User browse to products > category 1 > subcategory A. ALL "subcategory A" items (products custom post type) are displayed as ...
user avatar
  • 585
4 votes
3 answers
5k views

Bootstrap dropdown nav pills not working with wp_nav_menu()

I am using Bootstrap nav pills with drop-down items as WordPress menu, the menu without drop-down is looking good but when I add nested ul as drop-down the menu not working as expected.. HTML <...
user avatar
3 votes
3 answers
25k views

Dropdown with category selection

I created a directory website with dropdowns in the menu allowing the user to navigate throughout the categories and sub categories. [Website] I am using wp_dropdown_categories() to display the menus ...
user avatar
  • 275
3 votes
2 answers
868 views

Show child pages by menu order using Superfish Dropdown menu?

I'm using the superfish dropdown menu to create a drop down menu. It's created the menu fine showing all the parent pages with the child pages in drop down's below. The only problem I have is that ...
user avatar
  • 1,396
3 votes
2 answers
16k views

Bootstrap drop down menu with wp_nav_menu

I am trying to build a Wordpress theme with boostrap, but the nav menu is giving me some trouble. I would like the dropdown to work like boostraps dropdown, but I do not know how to do this. This is ...
user avatar
  • 269
3 votes
2 answers
21k views

How to create a drop down menu like in twenty eleven theme?

I really like the drop down menu solution of twenty eleven theme: http://twentyelevendemo.wordpress.com/ and would like to create a similar one but I cannot figure how it works, or is it based on ...
user avatar
3 votes
2 answers
295 views

Block Editor: add an aria-label to an option inside a SelectControl

I'm building a block that has, among other things, a FontAwesome icon. I'm currently letting users choose which icon by using a WP <SelectControl>. For individual <option>s, there is a ...
user avatar
  • 8,756
3 votes
2 answers
5k views

How to store the value of a custom field dropdown select for post referencing?

I'm trying to reference posts to each other. Editors should have a custom field select list of certain post's titles to link the current post with other posts. I got quite far, I think. The select ...
user avatar
  • 2,923
3 votes
1 answer
5k views

Drop down+sort blog posts date added/most popular

Is it possible to have a drop down menu like youtube/demonoid that allows you to sort your index (and caterogy.php) blog posts by date/popularity/viewed)? I seen plugins for adding most popular ...
user avatar
3 votes
1 answer
5k views

List custom post types in dropdown

I have three custom post types, each with around 5 taxonomies and 2 of the custom post types share two taxonomies. I've just about got everything set up for posting from the front end other than the ...
user avatar
  • 1,964
3 votes
1 answer
7k views

How do I give class to the dropdown sub-menu in the wp_nav_menu?

This is my html code <div class="section__main-nav" id="section__main-nav-id"> <div class="container"> <nav class="navbar navbar-toggleable-md navbar-light"&...
user avatar
3 votes
2 answers
690 views

How can I show drafts in wp_dropdown_pages list?

I am using wp_dropdown_pages in the backend of my site to generate a list of pages according to a specific set of criteria. The list only shows published posts where I would like it to show both ...
user avatar
3 votes
2 answers
1k views

Dropdown: Display terms from B only if has relationship with a term A selected

I've googling for a solution for this issue and found nothing: I have some posts from a Custom Post Type (Restaurants) and its taxonomies ('city' and 'cuisine'). Whenever I create a restaurant post, I ...
user avatar
3 votes
1 answer
2k views

No authors in change author dropdown

I have added a custom post type "Review", and a custom role "Reviewer". The issue is when logged as admin I take review which current author is admin and I want to change author to a Reviewer I have ...
user avatar
  • 347
3 votes
1 answer
296 views

Saving two categories from two dropdowns in front end posting form

So, here's the deal: I have two category dropdowns, the first for the parent categories and the second for the child categories. They form a chain so that when you select the parent category the ...
user avatar
  • 85
3 votes
1 answer
544 views

Replacing the NavWalker dropdown element

I'm creating a website for my school with Material Design for Bootstrap and the NavWalker is giving me some issues, I want to change the element of dropdown i.e. from ul to div. I've tried to edit the ...
user avatar
2 votes
1 answer
14k views

Customize the Sorting Dropdown in WooCommerce

It would be great if there was a way to change the default sort by dropdown in WooCommerce on the shop page. Right now the sorting drop down looks like this: http://cld.wthms.co/OBgj And I would ...
user avatar
  • 911
2 votes
2 answers
12k views

Custom widget using get_categories select menu dropdown

I have created a custom widget that is supposed to display a select menu with all the categories the blog has. I have used get_categories to compile the list. This works fine and all categories appear ...
user avatar
2 votes
3 answers
9k views

Dropdown list of a custom post type

I have a custom post type, Doctors, that I need to create a dropdown nav for. I just want it to populate a select list with all the posts of that CPT and navigate to that post on selection. I'm ...
user avatar
  • 21
2 votes
1 answer
10k views

How do I create a drop down menu in a widget?

How do I create a simple dropdown menu with 3 options in a widget? I'm using $instance to do it. How would it look in a barebones widget?
user avatar
  • 57
2 votes
2 answers
7k views

Display custom taxonomy as dropdown list

I want to display list of custom taxonomies as a dropdown list. I've found the solution here, @alexufo 's answer Display a custom taxonomy as a dropdown on the edit posts page But the problem with ...
user avatar
2 votes
1 answer
5k views

Filters post in admin with dropdown select, custom post type

I'm trying to filter my post in my admin area with a custom filter dropdown. I use this method to make it: https://wordpress.stackexchange.com/a/45447/84541 Here is my code: add_action( '...
user avatar
  • 111
2 votes
1 answer
4k views

Tags as a dropdown with set tags

Sorry if this is a silly question but is it possible to have a taglist as a dropdown? I have a page where users can post theyre own content, and I would like them to be able to choose certain tags ...
user avatar
  • 25
2 votes
1 answer
3k views

How to create drop down for child categories of current taxonomy being viewed?

I need to know how can I get the child/grandchild terms of the current taxonomy being viewed, and put it into a drop down so that I can add values to the options. I am currently using this code to ...
user avatar
  • 176
2 votes
4 answers
13k views

Select dropdown not showing selected value php

I'm using Wordpress Settings API. Everything works as it should except this select dropdown. When I select an option, the value echoed is correct but in the dropdown it displays the default first ...
user avatar
  • 263
2 votes
1 answer
4k views

Add submenu using the bootstrap wp_nav_menu

I have a problem to generate a submenu using wp_nav_menu . How can I change the ClassA submenu generated by the wp_nav_menu for ClassA the Bootstrap ? see my problem: This is my code that generates ...
user avatar
2 votes
1 answer
6k views

How to add country drop down menu to the user profile?

I've added this code snippet to my functions.php function my_new_contactmethods( $contactmethods ) { $contactmethods['country'] = 'country'; return $contactmethods; } add_filter('...
user avatar
2 votes
1 answer
304 views

How to get a list of taxonomy terms which are being used only within certain post types?

I have a custom taxonomy called 'locations' which is being shared across a bunch of post types. I want to make a select field dropdown list of my locations (terms) to let users go to the taxonomy term ...
user avatar
  • 1,734
2 votes
1 answer
4k views

How can I display parent and child taxonomies in separate drop downs?

The requirement is where i have a taxonomy State which is the parent and it has a child sub-taxonomies they are the Cities, Need to display the state as a drop down, when i select the particular state ...
user avatar
2 votes
1 answer
148 views

Drop-down menu with wp_dropdown_pages

trying to create a drop-down menu where the items are the children pages of a given parent page. The list has an autosubmit script. I'd like to add some css rule but unable to do so. Moreover, I ...
user avatar
2 votes
2 answers
1k views

How to retain the values from dropdown category lists after wrong form submission?

I can't figure out the the code for - How to retain the values from dropdown category lists after wrong form submission? Any suggesstions, thanx in advance. <select class="selectpicker btn-block" ...
user avatar
2 votes
1 answer
3k views

wp_dropdown_pages default value

I have a dropdown menu of pages, but after I go to a page selected, let's say "About us", the default title button of dropbown is the title of the page, "About us", so i want the title/default option ...
user avatar
  • 23
2 votes
1 answer
590 views

Archive dropdown styling not applied

I am trying to add a custom dropdown for archives but struggling with couple of mistakes that might be the reason why it doesn’t work. The CSS only gives my dropdown the width, not the other styles ...
user avatar
  • 37
2 votes
2 answers
2k views

Search results sorted by post types

I am working on a site with several post types - 4 to be exact - and I am trying to setup the search results page to have a filter/sort the results by post types. For example, when a person searches ...
user avatar
  • 21
2 votes
1 answer
3k views

Getting the dropdown menu to redirect to different pages?

What I am having trouble with is a dropdown box that I want to add to my sidebar. the blog will have more than one user so what I want for the dropdown to do is list all the different users by their ...
user avatar
2 votes
0 answers
198 views

Make Categories a Dropdown Menu in Media Library

I would like the categories menu to appear as a drop-down in both the list mode and grid mode view of the Wordpress media library. As of now, it only appears as a drop-down in list mode. List Mode - ...
user avatar
2 votes
2 answers
6k views

Get data from dropdown and update page

I have a simple webpage with a dropdown menu with a few options. I would like to be able to get the user's selection and then output the same selection on the webpage. This is the code I have so far. ...
user avatar
2 votes
0 answers
57 views

Wordpress Template not affecting the working, keeps defaulting to the index.php template

I thought this would be incredibly simple, but it has not. I have an index.php file that has my default template for my site. I then made a new file called magazine.php for a template file so that I ...
user avatar
  • 21
2 votes
0 answers
143 views

Admin menu bar dropdown opens when I click on a form <select> element (Chrome) [closed]

Whenever I click on a <select> element within a form, it opens not only the relevant dropdown but at the same time the first dropdown menu of the admin menu bar. It seems to be an issue with ...
user avatar
  • 5,921
2 votes
1 answer
2k views

Help with multiple dropdown tags search

I'm trying to build a search form that allows the user to choose certain post tags and filter through real estate listings. So far I have the form built but when I click the search button it brings me ...
user avatar

1
2 3 4 5
7