Questions tagged [select]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Load respective custom field as input field when the select option is changed

I have 2 custom Posts Type Subject Clusters ( is a group of subjects) Subjects So when a new cluster is saved, it saves a group of subjects. Subjects (2nd custom post type) can be added via a ...
0
votes
1answer
14 views

Query a Custom Post Type using SELECT that has ACF fields to compare dates

So I have a CPT called ads that has ACF fields of ad_start_date and ad_end_date. I am trying to write a custom WP query using a SELECT statement instead of using WP_Query because I am return an ajax ...
0
votes
1answer
27 views

Reload page with a different shortcode when a user selects from a dropdown

I'm using WP Job Manager, and the page which lists all available jobs is delivered using a shortcode which can be customized. so [jobs per_page="10"] is outputed in the frontend as: <div class="...
0
votes
0answers
25 views

AJAX call recieving a 400 bad request when array lenght is to long

I have a select dropdown where users can choose multiple options that get's sent to a custom Rest-API endpoint and returns values based on their selection(s). The dropdown is dynamically populated ...
0
votes
0answers
66 views

Add select filter based on acf field to custom post type in dashboard

Good morning everyone; I am trying to add a select filter like this: Select filter based on taxonomy To do this, I am getting all field values like: Display all select field values I am able to ...
0
votes
1answer
39 views

choose selected for select option with condition [closed]

I have a select option like this <select name="select1"> <option value="value1">hots</option> <option value="value2">popular</...
0
votes
2answers
30 views

How to set different color in a select box due to selection with css

I have a select box with 2 options. In the selct area the options are green for 1 red for 2 I had been able to set green also as the color for the predefined option. Now I would like to change this ...
0
votes
0answers
12 views

How to output CMB2 select options from repeated groups select elements?

I've searched in previous posted questions but I can't find something similar (but if it's already posted, please let me know). I've got the following repeated group of fields, with a select in it: $...
1
vote
1answer
180 views

Custom Meta Box (SELECT) Not Saving

I am trying to create a meta box with select options for each page with home-page-template.php assigned to it. I have got that functionality working correctly. I also want it above the editor, below ...
1
vote
1answer
24 views

Creating select dropdown with parent-level custom post types

I'm trying to create a dropdown with an option for each top-level parent. I've gotten the query down because when I print the results, I see the posts I'm looking for. My code is also creating the ...
0
votes
0answers
108 views

Dynamic Dropdown Select Filter with Custom Taxonomy in Custom Posts

I want to create a Dynamic Dropdown Select Filter in my homepage to filter custom posts by parent and sub-categories. The maximum depth for filtering is 4 levels. My Custom taxonomies structure is ...
0
votes
1answer
55 views

Dropdown select filter and categories list

I have recently visited this website and came to know that it is running on wordpress. I have been looking for dropdown select filter (Banks Filter) and categories list as same as on that website. ...
2
votes
1answer
22 views

Export posts manually selected by end user (not logged in)

For an intranet project, I'd like to have not logged in users be able to manually check posts (with checkbox in front of post title on archive page) and be able to export some predefined data about ...
0
votes
1answer
39 views

Nested select statements not working

I have 2 tables I need to search. 1st table Name: Personnel Fields: id, lname, fname, department, extension 2nd table Name: department Fields: id, department The 2nd table has the full department ...
0
votes
0answers
11 views

sql query for selecting btween two amounts

I am trying to achieve the result by selecting dropdown between two amount range. echo '<option value="browse-events?city='.$browse_city.'&type='.$browse_type.'&price=Free">Free</...
0
votes
1answer
34 views

Woocommerce add a text field if specific option is selected

I need to make active/visible a new filed before 'Add to cart' button, only if user select a specific option. The case is simple: I sell t-shirt with options: "Small", "Medium", "Large", "Size upon ...
0
votes
1answer
346 views

ACF: Filter Conditional Logic Sub Fields Based on Parent

I am trying to create a search that filters posts by country and state/region/province. I have created some conditional logic sub fields based on country and now I am trying to figure out how to ...
0
votes
1answer
954 views

Sorting dynamic select/dropdown for Contact Form 7 of Modern Tribe Events posts

What I have is a dynamic dropdown/select box in Contact Form 7 I believe to be based on this: https://gist.github.com/morgyface/56474f0a37abb7d622880daf6eff6e40 It's been a while since I worked on ...
1
vote
1answer
362 views

Wordpress select field - show current value?

Function is generating select field, what can I do to set 'selected' currently saved value ... if possible? For example, previously I selected 36 and saved "update_option('_nos',$myvalue)" function ...
1
vote
0answers
9 views

Add select input with pre defined classes to insert image screen?

I'm looking for a way to add a select element (or some multiselect variant) with pre-defined classes to the image insertion screen in Wordpress. I've been looking around for some way to do this but ...
0
votes
1answer
313 views

Multiple selection for wordpress widget

I created my own category selection widget. So i used <select> but i want to use with multiple attribute. Here is my widget class. It works perfect without multiple attr. But i want to use it. ...
0
votes
1answer
762 views

Check if a value exists in database table

I have a custom self made registration form where a user needs to enter his address, I need to check if his address is already added in a custom table(which I have made manually with table prefix). I ...
0
votes
3answers
62 views

put a list of one post type in other post type to select from it and display selected item in second post type's single page

I have two post types in my website. one for courses and other for teachers. I want to put a selectable list of teachers post type in courses post type and then show it in course single page and link ...
0
votes
1answer
18 views

Menu selection for header

I have created multiple menus. What I wish to accomplish is give viewers the ability to select which menu they want to use for the header. Closest ive gotten to is the conditional menu plugin but that ...
0
votes
1answer
36 views

Wordpress admin area: select box with 12.000+ options

I have a custom post type that in admin area has a select custom meta box with 12.000+ options. So, in some cases, WordPress show an error message like memory exhausted. Which could be a good ...
1
vote
0answers
34 views

Get parent and children taxonomy in different dropbox

I would like some help, I have this situation Taxonomy = Location where Brasil = Parent - Acre = as first child -- Rio Branco = another child -- another city = another child -Santa Catarina = as ...
1
vote
0answers
14 views

Select Query demand excesive resources [closed]

Good Morning: I had detected that in a couple of times in the day I fond this query using a huge amount of resources in my wordpress server. The query start to make a copy to disk of almost all the ...
1
vote
2answers
715 views

Wordpress shortcode attributes for database SELECT?

I have created a small shortcode function with attributes to review if attributes are handled properly. That's the case and now I would like to use the attribute in a SELECT statement. But the ...
0
votes
1answer
292 views

Echo Option Value Based On Wordpress User Role

If someone can figure this out, man you would make my week! Basically what I'm trying to do is echo a different value in a option based on a the users role on Wordpress. If user is administrator ...
3
votes
1answer
3k views

Filtering custom posts with Ajax

I looked in other questions, searched on Google... And got nothing. I need to filter the posts from a custom post type based on the selected value. I have another part of the site where I use Ajax ...
1
vote
1answer
25 views

I have 2 post types i need to show the post type contents in 2 select boxes [closed]

I have 2 post types (Doctor specialization, Doctor Profiles).i need to show the post type contents in 2 select boxes.
0
votes
1answer
1k views

Changing select options based on previous select with PHP & AJAX

I looked at some answers here on SO and googled a bit... But couldn't make this work. I have 0 experience with Ajax and I'm new to PHP. What I need is to change the options of the other selects based ...
1
vote
0answers
154 views

Long running queries

I'm trying to build a PHP script that will pull the 10 most read posts (weekly) and will return me an XML file (so I can link it to Mailchimp). Im also using - Post Views Stats Wordpress plugin by ...
0
votes
1answer
450 views

Retrieve select tag custom values from array and display them in current page with wp_query?

I have a select tag (in filter.php) with different training prices ($80, $120, $500, etc). The values are stored in the array $options (thanks to Tom) : I'd like to display, when visitor clicks in $...
0
votes
1answer
121 views

Create multidimensional array of taxonomies

Create multidimensional array of taxonomies Hello all, I need to create a multidimensional array to populate my select via javascript. At the beginning are two selects of taxonomies, 'store' and '...
0
votes
1answer
7k views

Custom contact form 7 select with custom values [closed]

I have been searching for a way to add a select field to the Contact form with custom data. The goal is to have a form where someone can ask for information on an article by selecting the article ...
0
votes
0answers
948 views

add image in dropdown select

if (!function_exists('dropdown_categories')) : function dropdown_categories($show_option_none, $name, $selected = '') { if (of_get_option('blog_cat_id')) { return apply_filters('...
0
votes
1answer
196 views

Get Link of Page Selected through a Select Field in Custom Admin Page

I've created a list of pages in the backend of a Wordpress site using wp_dropdown_pages();, which of course shows a dropdown of existing pages. What I'd like to achieve is retrieving not the name but ...
0
votes
1answer
713 views

Default URL for category dropdown select option

I have a dropdown menu for my categories: <form action="<?php bloginfo('url'); ?>" method="get" id="catform"> <?php $parent = get_cat_ID("Pictures"); $select = ...
0
votes
3answers
120 views

ACF Pro select field problem [closed]

I am trying to use ACF Pro Select field to display a specify social media icons. So I have this code in my theme: <?php if( get_field('social_medias', 'option') == 'facebook' ): ?> &...
0
votes
3answers
103 views

How to convert select to HTML with PHP tags inside of it [closed]

I apologize for asking such a simple question, but I am having a world of struggle in trying to convert the following echo statement to HTML with php tags inside of it. I am trying to get my custom ...
1
vote
0answers
423 views

Woocommerce Product Custom Select List (not variation)

I'm not asking anyone for a whole solution (although I'd gladly accept), but rather for someone to point me in the right direction as to how to accomplish this. I am a web designer with intermediate ...
0
votes
1answer
22 views

database select issue

I am writting plugin where i have custom table. I am trying to access one random row from last 5 rows from this custom table. "SELECT * FROM $table_name WHERE id > MAX(id)-5 AND id < MAX(id)+1 ...
1
vote
1answer
429 views

How to make drop down post title

I am developing a website using WP CMS where I want to implement post title as drop-down list as well as when users select a drop-down title the content show below within reload. I am here. What will ...
0
votes
1answer
36 views

Select field value not returned after saving changes

I've been searching around for an answer to this one but have had no luck thus far… forgive me if it has been answered somewhere before! I'm currently writing a plugin and I'm using the WordPress ...
0
votes
1answer
531 views

How to call custom jQuery plugins into the customizer controls

I never tried to use the theme customizer, somehow I don't find that thing good. But recently I tried it, and stuck into this matter. I extended the Class WP_Customize_Control to made my own <...
1
vote
1answer
35 views

Need a help on sanitization

I have a theme on review, and I do add section 'type'=> 'select' on few occasions like this. $wp_customize->add_setting( 'personal_lite_post_link', array( 'default' => 'enable', ...
2
votes
3answers
10k 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 ...
0
votes
0answers
501 views

Implementing Select2 plugin into Wordpress

I am currently trying to implement the Select2 plugin in my Wordpress site to get the beautiful dropdown select boxes that allow users to select multiple items. I have pasted the following code ...
0
votes
1answer
46 views

SELECT statement wrong?

This code works correctly down to the eighth line from the bottom. The SELECT statement there does not find the one record that was just inserted. It is the only record in the table at this point. ...