The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
2answers
544 views

Select box saves but doesn't update value in admin

I have a select dropdown in my custom meta box in the admin area. It offers two options Approved and In Progress. When I select an option and save it the database is updated, but the value in the ...
2
votes
1answer
412 views

Listing all capabilities in dropdown is returning boolean

Trying to put a list of all possible caps in a dropdown. I can only get it to return 1s (boolean true). If I use var_dump($user->allcaps); it does produce the actual cap names, but when I plug this ...
1
vote
1answer
606 views

Multiple options not staying selected after saving

Problems: The save works, but is only storing one of the options in the database after save. Options not showing as selected after save. The select fields: <select id="...
0
votes
1answer
114 views

SELECT query with prepare and placeholder for string

I am trying to learn how to do a simple Select query using $wpdb-prepare. I am checking wether an email submitted by the user is already available in the database. There has to be something wrong ...
0
votes
1answer
127 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
1answer
113 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 ...
0
votes
1answer
112 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
1answer
159 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
1answer
68 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->...
-1
votes
1answer
844 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
111 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 ...
-2
votes
1answer
341 views

Is there a way to select posts and print to a template page dynamically?

I'm trying to print posts by selecting posts and doing a bulk action to dynamically add them to a template page I already have set up. Is this possible? Update with more info: I'm using this ...
2
votes
0answers
21 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>&...
1
vote
0answers
8 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
338 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
291 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
54 views

Marking Multiple Options Selected in Different Select Boxes

I've added a multi select box to each menu item on the Menus page. How can I mark multiple items as selected for a given select box? <script type="text/javascript"> jQuery(document).ready(...
0
votes
0answers
64 views

SQL in WordPress get_var() not working

I created a few tables in my main WordPress database. Table names are: cards scards I put a plugin that lets me use PHP in pages, I used it in my other WordPress sites successfully but in this ...
0
votes
0answers
21 views

Get options from a select custom field

I've created a select custom field with different predefined values. I've done this using the Types extension for WordPress. Now I'd like to create a function to retrieve all the values that this ...
0
votes
0answers
48 views

Select fields on a settings page

I'm trying to do it in the style of 'Example #2' on this page: https://codex.wordpress.org/Creating_Options_Pages as it seems the tidiest way I have come across to do it. The problem is I want to ...
0
votes
0answers
78 views

Correct way to create a select list in one metabox of custom-post-type

I'm trying to make a custom one from dropbox type within another custom type with popular and use the information but after that the post that estpu working to change the type of this type in the ...
0
votes
0answers
200 views

Using $wpdb->get_results with Select and a comparing a column with a variable

I wasn't sure whether I should ask this on stackoverflow so I thought I'd try here instead. I'm developing a custom plugin and I've got to retrieve some numbers from a table where the value in the ...
0
votes
0answers
234 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
0answers
36 views

Cannot save select multiple option in my plugin options

I have a select element in my plugin option page, but can't figure out how to save it correctly (all other options are correctly saved and reused). public function ce_blog_chief_editor_callback(...
0
votes
0answers
922 views

Get results from wordpress data custom table

Firstly i created a custom table into the wpdb : global $wpdb; $table_name = $wpdb->prefix . 'countdown_table'; $sql = ' `id` int(11) NOT NULL AUTO_INCREMENT, `styleName` varchar(255) ...
0
votes
0answers
215 views

Add SELECT in search form

I'm trying to change the searchform adding select tags. In my theme, if I search "a b c", the search result in the URL is "/?s=a+b+c", but with the new form I am not able to print the sum. This is ...
0
votes
0answers
519 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
345 views

select to search in category AND custom post type

I try to do something but which I block. What I need is simple: a search textbox and a select which allows the user to search either in whole or in custom post types, or in category. Separately, I can ...
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
0answers
665 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
534 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
133 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 ...
-1
votes
0answers
9 views

How do I create a select box that, upon selecting a value, will display information pertaining to that value?

I have been searching for an answer to this to no avail. I can make it work with some jquery on a normal HTML page, but not a wordpress page. A good example of what I need is expressed in this ...
-3
votes
0answers
18 views

Skip passing value in form

Is it possible to skip passing value in form if user doesn't choose something and default value "Choose your color" is selected? <select name="something"> <option selected="selected">...