Questions tagged [select]

The tag has no usage guidance.

45 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
60 views

Select menu should display categories and the item's depth

I have a select menu of a custom post type in the header.php: <?php $selectloop = new WP_Query( array( 'post_type' => 'products', 'posts_per_page' => -1 ) ); echo '<form>&...
2
votes
1answer
24 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 ...
1
vote
0answers
38 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
449 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
0answers
11 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 ...
1
vote
0answers
40 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
212 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 ...
1
vote
0answers
457 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 ...
1
vote
0answers
1k views

How to add select list to meta box field?

I have created custom meta box field product_statuss to my CPT product. I want to predefine four possible statuses and display them as dropdown list but have spent 4+ hour running the same error. Here ...
1
vote
0answers
39 views

wp_Qwery works to slow

I have 266 806 rows in wp_posts, and when I'm trying to get post this help of WP_Query or DB SELECT which sort parameters it's gets results more when 0.3ms Exemple of SELECT: SELECT ...
1
vote
0answers
10 views

Selecting and outputting results from DB with an array

I have always had issues with arrays. I can never seem to get them to work correctly. Could someone advise me. I want to make a selection from the database, use that in another selection and then ...
1
vote
0answers
459 views

Front-End Custom Taxonomy Tag Select

The theme I am currently using features a front-end dashboard with posting and post editing, but the pre-existing submission form currently lacks a field to select one or more custom taxonomy tags (...
1
vote
0answers
423 views

Multi-select field for Taxonomy can't save the value

I'm trying to create a multi select field for Taxonomy pages, and the problem is in saving all the selected values, for example if I choose couple of elements in the select field and save it, it will ...
0
votes
0answers
8 views

How do I create a select menu of titles when creating a new page/post?

I am trying to write my own custom WP Theme for a fitness organization. When admins create a new certification, the title of the event will always be from the following: 1. Kickboxing Certification ...
0
votes
1answer
15 views

Can't add Select2 to select in variable product (admin)

I'm trying to add select2 to an input in WooCommerce variable product admin. I've added select2 to a class so it can be reused, however, it seems it's not working. It's working anywhere else on the ...
0
votes
0answers
13 views

Media selection and multiple rows with jquery?

I need to make a WP plugin that would have: A WP-Admin page for doing stuff. In this page you need to have a row with a button that open the media gallery popup, where you can choose an image. In the ...
0
votes
0answers
24 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
89 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
0answers
33 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
197 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
2answers
65 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
1answer
161 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. ...
0
votes
1answer
78 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
1answer
47 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
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
57 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 ...
0
votes
1answer
357 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 ...
0
votes
0answers
1k 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
23 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 ...
0
votes
0answers
560 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
877 views

How to Display image from Menu Image in Walker Dropdown Select Menu

Created a custom menu list, titled Country that has flags representing countries (only Canada and USA) using the plugin Menu Image I combined this menu with Walker, to create a dropdown. I however ...
0
votes
1answer
269 views

WordPress Multiple Taxonomy Query

I've a simple form made up of two multiple selects which (as if by magic) filters my posts archive with URL parameters: <form class="filters"> <select name="country" multiple> ...
0
votes
1answer
456 views

Custom Select Query pagination not working properly

I have Custom Select Query joining two tables and displaying events older than current date. Everything works fine until I try to paginate it. <?php global $wpdb; $date = date("Y-m-d");...
0
votes
0answers
624 views

Ajax Form data is not posted back to the get_results()

I am trying to run a wordpress wpdb->get_results select query and I want to get the search criteria from a textbox. I want to do it form and with ajax without refreshing the page. No matter what I do ...
0
votes
1answer
268 views

Widget & storing a Select box choice

I am creating a simple widget which displays all of the pages on the website. The trouble I am having is how to store the user's choice and display it on the front end. At the moment, when saving my ...
0
votes
0answers
1k views

wordpress option page data from select form is not saving to database

I am going to create a wordpress plugin with a option page and I have created a two page called index.php and options.php and in index.php I have written the following code to create default options ...
0
votes
0answers
6k views

AJAX with Selectbox Plugins (Select2, Chosen, Selectize)

I have been searching all over the internet for tutorials on implementing AJAX actions from jQuery selectbox plugins such as Select2 , Selectize and Chosen. (these plugins look better than the inbuilt ...
0
votes
1answer
247 views

Get post title by Alphabet

I try to call this function to get a list of posts by alphabet. But for some reason i keep getting an error. Call to a member function get_col() on a non-object. What am i doing wrong? {function ...
0
votes
0answers
1k views

WP Query multiple select form - meta_query help

I am creating a multiple filter - as in I could filter by all the options if I wanted to do so, i.e terms, calories & price in my case. I am having trouble with meta query args. At present I can ...
0
votes
0answers
1k views

Auto Select Child categories on Multiple Dropdown - Jquery

I am using the wp_dropdown_categories to generate the form and select option, with multiple select jquery plugin. What I want is that, when the user selects the Parent category or (level-1) then the ...
0
votes
0answers
153 views

Combine Query and Select Database to create directory loop

I have a query loop on my page that I am using which displays all users on the page with certain custom fields filled out. It's working fine however, I need to also query these users for their level ...
0
votes
1answer
96 views

Sanitizing a custom query's clauses

I'm trying to build a custom query much like the one found in WordPress' native get_posts() inside wp-includes/query.php, meaning something along these lines: global $wpdb SELECT * FROM $wpdb->...
0
votes
1answer
173 views

Ajax Query returns zero

I am doing simple wordpress select query and want to do this with ajax jquery and do not want the page to refresh when I press search button and writing text in search textbox. As soon as I press ...
-1
votes
1answer
1k views

Open WordPress Page from selected option dropdown

Code/process to get option dropdown menu selection to open page in WordPress with php? Tried all kinds of plug-ins, widgets, but none will make menu that fits requirements of project so far. ...
-1
votes
1answer
121 views

Custom wordpress SQL statement for a website

I'm trying to link specific columns from a few standard tables in a wordpress database. I specifically want to see a view/table that includes: post title post content guid meta value = image url ...