Multiple level category drop-down three levels is not working

I have three drop-down list in cascade, I'm using the code of Ján Bočínec but it working just the first level when I choose the grade it not work, should enable the third drop-down list and show the groups. I see that the jQuery('#parent_grado').change is not working, I don't know if is because is created dynamically. Can you please help me to find the bug or advice me if is possible the way that I try to created the web …
Category: Web

Multiple Dropdown's with Submit Button

I am pulling 2 categories into 2 dropdown lists. When I click submit the URL is showing the filtering but its just loading the homepage. I want the user to be able to select multiple categories and submit to show results. <?php $price = array( 'show_option_all' => '', 'show_option_none' => 'Price Range:', 'orderby' => 'ID', 'order' => 'ASC', 'show_count' => 1, 'hide_empty' => 1, 'child_of' => 110, 'exclude' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 1, 'name' …
Category: Web

Dropdown Select Post Filter

I would like to display the posts when I click on an item with the dropdown select Currently, my select is OK, all my terms are displayed and all posts too. I just want to know of it's possible to filter This is my dropdown select : <select name="soins-taxonomy"> <option value="all">Tout afficher</option> <?php // Get the taxonomy's terms $terms = get_terms( array( 'taxonomy' => 'location', 'hide_empty' => false, 'exclude' => 1 ) ); // Check if any term exists if …
Category: Web

Create a Dropdown Selector and Redirect for a Custom Taxonomy in WordPress?

I'm trying to create a dropdown selector on my CPT and CT archive page for a custom taxonomy called "location". I've managed to get the form to submit, however, it does not direct me to the archive page, rather it directs me to a URL that looks something like this https://example.com/?location=11 I'm wanting the destination URL to be this: https://example.com/location/term-name Bare with me as I have no background in Computer Science / IT so I'm learning on my own. Below …
Category: Web

Add Dropdown menu using "add_filter => wp_nav_menu_items"

My project: Wordpress, Woocommerce, Bootstrap 4, bs4navwalker My problem: Custom dropdown item added by WP filter. I have one navbar, 3 differents menus inside (using bs4navwalker), a badge for the cart and a search form. See code. I'm using a filter (add_filter( 'wp_nav_menu_items',) to add login, logout and myaccount details in my navbar, everything is ok, but i'd like to add these items inside a dropdown. The filter just creates one or two more items to the 'user' menu. I …
Category: Web

Create a drop down list within an active page not nav menu

I am working for a client that has requested a drop down list for some categories within a page, i.e. click on the link and a list drops down to select the page you want to view. Everything I seem to be finding is telling me how to create the drop down in the nav bar, that is not what I need. Any help is greatly appreciated...
Category: Web

Dynamic dependent Dropdown lists for categories, sub-categories and posts

I'm using WordPress 3.5. I need a way to implement a code or plugin to allow users to navigate through posts using dependent(chained) dropdown lists. In other words I would like 3 dropdown menus to be dynamically populated based on the selection chosen in the previous dropdown lists. This would consist of: Dropdown 1: Category* Dropdown 2: Sub- Category* Dropdown 3: List of posts in Sub-Category* *Dropdown 1 would be pre populated with categories. *Dropdown 2 would list the sub …
Category: Web

Navbar- disable "onClick" drop-down

I'm working on a project on my desktop for a theme development, but an issue I am having is that when the user clicks on the navigation menu, it causes it to collapse. Since I got collapse to work on hover, I don't need it when clicked. I'm using the theme Unite. I don't have a way of sharing this project, and only have done surface customizations until the navigation bar. It's all the original PHP and JS. The CSS …
Category: Web

I want a simple dropdown for locations in woocommerce

I want to have multi locations for pickup. I want it no where in site, only in checkout when someone click pickup at local pickup, then this dropdown appear. And also it go in emails etc and so on. I tried plugins but none of plugin work like this. One work and they are not fixing bug. Is there any way that I just put the list or custom post type in backed for the list of local pickups, and …
Category: Web

How to pick the default selected value in wordpress dropdown?

First of I am pretty new to this so sorry if this has been asked before but I could not find the right answer for me. I have this dropdown on my website from compare-tech(.)fr I am trying to remove "Toutes les catégories" and make "Acheter" the default value. I have tried adding a function to wordpress but it did not work, I tried : (again I am new to this) function wp_dropdown_categories( $args = '' ) { $defaults = …
Category: Web

Use output of wp_dropdown_categories($args)

Please be gentle, I'm new to all this coding! I have finally worked out how to get a frontend dropdown field allowing me to select from EDD categories (I got this from the Codex): <div class="gallery-row"> <li id="categories"> <h2><?php _e( 'Categories:' ); ?></h2> <form id="category-select" class="category-select" action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get"> <?php $args = array( 'taxonomy' => 'download_category', // EDD custom post type Taxonomy 'order' => 'ASC' // Order of the list ); wp_dropdown_categories($args); ?> <input …
Category: Web

Multiple quantities with options

I have a medical lens website and I tried to make custom order product in woocommerce. I want 2 options. When the first one is chosen, it hides 2 dropdown lists and shows only 1 drop down list, and when I choose the second option, it hides 1 dropdown list and shows 2 dropdown lists and each one has the count of quantities. Example: How can I do this? I tried to make this with Variable Product but it doesn't …
Category: Web

Dropdown list control in a post

I don't know if I'm missing something, but I've really tried searching and I cannot find a drop-down list control that can be inserted into a WordPress page or post. I run a sports website and what I'd like is to be on the league table page and have a drop-down in the post/page that the user can select another year and it goes to the associated page/post. Any ideas how that can be achieved?
Category: Web

Get the selected option from drop down list

I created a dropdown list using data from the db to fill the options. This is working fine. Now I want to get the chosen value to select all posts with that value from the db. I have been searching and trying many suggestions I found, but until now nothing seems to be doing the trick. If possible I want to get this done in php (value needs to be in $ to build db-query). This is the code that …
Category: Web

Twenty seventeen theme dropdown menu issue

I am using Twenty seventeen to build my own design dropdown menu not working for me when I hover on the parent no thing shown here is mu own HTML output <div class="headermenu"> <div class="headermenu_wrap"> <div class="menu-primary1-container"><ul id="menu-primary1" class="nav-menu"><li id="menu-item-115" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-115"><a href="http://127.0.0.1/sh/1/?page_id=113">search1</a></li> <li id="menu-item-121" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-121"><a href="#">sub<svg class="icon icon-angle-down" aria-hidden="true" role="img"> <use href="#icon-angle-down" xlink:href="#icon-angle-down"></use> </svg></a> <ul class="sub-menu"> <li id="menu-item-116" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-116"><a href="http://127.0.0.1/sh/1/?page_id=77">search<svg class="icon icon-angle-down" aria-hidden="true" role="img"> <use href="#icon-angle-down" xlink:href="#icon-angle-down"></use> </svg></a> <ul …
Category: Web

Multiple Custom Taxonomy Dropdowns Lists

I have 3 hierarchical (category-like) custom taxonomies in a WP site, books, characters and writers. I want to create a dynamically populated dropdown menu of terms for each of these in the site's sidebar, so that on selecting a term in any of the dropdown the site automatically loads the corresponding archive. Using the method described here I can get this working on one taxonomy only. As soon as I add more I find that only the last one works. …
Category: Web

dropdown with no submit

So I have a dropdown menu that has a list of all pages using a certain template, when the user selects a dropdown item id like them to be re-directed to that page. Here is what I have so far... <div class="col-md-6 col-md-offset-3"> <?php //create a var using get_pages create an array and get all page names $pages = get_pages(array( 'meta_key' => '_wp_page_template', 'meta_value' => 'template-services.php' )); ?> <p>Looking for something else?</p> <select id="cat" class="form-control"> <?php // for each item …
Category: Web

Add role selector to custom registration page

I have sucessfully integrated this code in functions.php //1. Add a new form element... add_action( 'register_form', 'myplugin_register_form' ); function myplugin_register_form() { global $wp_roles; echo '<label for="role">Type de client</label>'; echo '<select name="role" class="input">'; foreach ( $wp_roles->roles as $key=>$value ) { // Exclude default roles such as administrator etc. Add your own if ( in_array( $value['name'], [ 'Client', 'Entreprise'] )) { echo '<option value="'.$key.'">'.$value['name'].'</option>'; } } echo '</select>'; } //2. Add validation. add_filter( 'registration_errors', 'myplugin_registration_errors', 10, 3 ); function myplugin_registration_errors( $errors, $sanitized_user_login, …
Category: Web

Change WooCommerce Payment Options From Radio Buttons to Dropdown Menu

I would like to have my WooCommerce payment options displayed as a drop-down menu rather than radio buttons within Checkout, but can't figure out how to do this and can't find any plugins to do similar. I would like the solution to not include editing any plugin or theme files, it will need to be implementable by either functions.php, a custom plugin rather than functions.php or via JavaScript. Happy for it to be either of these. My site is https://suescents.co.uk …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.