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”> <button class=”navbar-toggler” type=”button” data-toggle=”collapse” data-target=”#main-navbarToggler” aria-controls=”main-navbarToggler” aria-expanded=”false” aria-label=”Toggle navigation”> <span class=”navbar-toggler-icon”></span> </button> <div class=”collapse navbar-collapse” id=”main-navbarToggler”> <ul class=”nav navbar-nav”> <li class=”nav-item active”> <a class=”nav-link” href=”https://wordpress.stackexchange.com/questions/300573/index.html”>Home<span class=”sr-only”>(current)</span></a> </li> <li class=”nav-item dropdown”> <a href=”shop.html” class=”nav-link dropdown-toggle dropdown-hover” data-toggle=”dropdown”>Shop</a> <div class=”dropdown-menu”> <a class=”dropdown-item” href=”#”>Hoddie</a> … Read more

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 default by date. Each item in subcategory A has a custom field “size”. User can select the size with a dropdown … Read more

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 list appears correctly. All titles are there. Now, I’m stuck at the point, where the referred post’s ID has … Read more

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 built-in way to add a label. For example: <SelectControl value={ icon } options={[ { label: ‘’, value: ‘fa-address-book’ } ]} /> Combined with CSS this … Read more

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 some existing code for dropdown menus? Is there any source code that can be used, or can someone explain the principle behind … Read more