The tag has no usage guidance.

learn more… | top users | synonyms

-1
votes
0answers
15 views

Help me identify best theme / foundation to start developing a portfolio website [closed]

I'm trying to create a portfolio website where I can showcase some of my work as well as write about some of my thoughts. If I could make one existing website my portfolio it would be the solveforx ...
0
votes
1answer
17 views

Can I limit term selection to one plus parent?

So i have a custom post type (listings) and a custom taxonomy (listing_terms). The taxonomy has parent/child terms. Eg: Restaurant -> Cafe (where Cafe is the child of Restaurant). I want to only let ...
0
votes
0answers
44 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"> ...
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 ...
0
votes
0answers
48 views

Contact Form 7 Dropdown menu populated with post titles, pre selected from url

I'm using contact form 7 as my contact page and trying to populate a dropdown select menu with a list of the post titles. In addition to this if a user browsers to the contact page from a href link ...
-1
votes
1answer
20 views

Tool to check the database in Production [closed]

I Would like to use a tool to execute SELECT requests on the PRODUCTION database. This tool must be full security because my site is deployed on Internet. Any idea ? Regards
0
votes
0answers
55 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
1answer
37 views

Populating dropdown menu with hierarchical taxonomies

Im currently populating my <select> elements (I've got plenty of them) with nested foreach loops, get_terms() and &nbsp;&nbsp;&nbsp;&nbsp; to create padding for each nested child ...
1
vote
1answer
128 views

How to number the options in a wp_dropdown_pages() select?

I'm using wp_dropdown_pages() but would like to number the options returned for the user. So instead of something like... <option value='http://someurl'>item one</option> <option ...
0
votes
0answers
18 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
2answers
77 views

$wpdb-prepare : Do I have to bind a parameter to the table name?

I only do a SELECT on a whole table - and the table is defined in a variable: $table = $wpdb->prefix . 'members'; Do I have to bind a parameter to this variable? This caused an error: $result ...
0
votes
1answer
86 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
2answers
195 views

Display tags from specific category in select fields

I am looking to display all tags in select form that are from posts that have been assigned to a specific category. I am using the following code to generate every tag in a select form <div> ...
0
votes
0answers
36 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
1answer
61 views

Adding option values as an array using a multi selectable select box

I have a plugin I'm developing. As part of its functionality I need to set up an option group and specify an option var for that group: function swcs_settings() { register_setting( ...
0
votes
0answers
65 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
1answer
98 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 = ...
0
votes
1answer
339 views

Custom select query two tables by a meta key

I'm using an event plugin which creates wp_ftcalendar_events table in database with start_datetime column. Here's image of whole table: I want to query my posts by start_datetime. I know that I ...
0
votes
1answer
39 views

Add category selection to function request

Got the following in my functions file, which is designed to query the last three posts published, however I want to limit it by a certain category. I was looking at adding is_category to the WHERE ...
0
votes
1answer
469 views

Making jQuery .change() event persistent after widget save

I'm creating a custom widget that uses a select element with a bunch of options and a simple jQuery function to trigger the visibility for some <div>s below it based on the selection, through a ...
0
votes
1answer
141 views

Select query for a login

I'm trying to make a login form, but select query isn't working. Is there another syntax in WordPress and in which way is password hashed? My code is: if ( isset( $_POST['submit'] ) ) { if ( ...
0
votes
0answers
41 views

cannot keep the selected value even after using selected

I am trying to make a drop down in post_meta in wordpress and when the user selects a template it shows this template. The template selection gets updated in database but not in the dropdown. what am ...
0
votes
0answers
95 views

Reorder results of select query by distance

What I'm trying to achieve is a store directory listing nearby stores, ordered by distance. I've managed to grab all the stores within the specified radius and display them, and also calculated the ...
0
votes
1answer
64 views

Read post meta values, only if posts are public

I want to retrieve meta_values applied to posts. Currently I execute the following query global $wpdb; $table = $wpdb->prefix.'postmeta'; $values = $wpdb->get_results( "SELECT meta_value ...
0
votes
1answer
102 views

Selecting NULL value from the database

I have a database with columns that are allowed to be NULL. Whenever I run a query against this database using $wpdb->get_results the columns that are NULL are always returned with an actual ...
0
votes
2answers
480 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 ...
0
votes
0answers
157 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
221 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
105 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
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 ...
0
votes
1answer
219 views

Custom Taxonomy Select Menu: Setting default option value?

I'm creating a series of select drop down menus that pull data from various taxonomies. I got this PHP script working for a WooCommerce attribute of color: function get_color_dropdown($taxonomies, ...
0
votes
1answer
229 views

Trouble creating custom sanitization function for user list dropdown

I'm trying to create a custom author info box on homepage which will automaically generate by getting the info from user profile when a user is selected from theme customizer. I followed the code ...
1
vote
1answer
1k views

Select data from database and list it in Loop (Wordpress)

your Answear helped me but i stuck again. here is what i have done now : <?PHP define( 'WP_USE_THEMES', false ); get_header(); global $wpdb; $sql = "SELECT vehicle_id, manufacturer, series, ...
0
votes
0answers
756 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
1answer
1k views

Using a multiple <select> element in widget form

I am trying to save all of the options in a <select> element in a widget. So far I have the following PHP code for the form: public function form( $instance ) { // Code for editing/adding ...
1
vote
2answers
502 views

how to save selection meta data in user profile on frontend

Hi can anyone help me to save the post title selected in this select box? I would like to let people select posts out of a dropdown select box and save the value to their profile. Help is very ...
0
votes
1answer
94 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 ...
-3
votes
1answer
193 views

dropdown does not work [closed]

I have the page http://www.supersprox.eu/invoicewithtabs/. When I click "Show filter" button an area with several dropdowns appear. The problem is I can not select values of the first row of ...
0
votes
1answer
471 views

Can't save drop down select date in meta boxes

I want to update my select options(drop down) but i don't know where i made a mistake.Here is my code. <?php function display_post_options(){ wp_nonce_field( basename( __FILE__ ), ...
-1
votes
1answer
111 views

Issues on saving data from CPT select metabox

I can't save data from a select metabox. My code is http://pastebin.com/BMmKzti2 Where I'm going wrong? Edit: Here is my code function fichasvtmbasicas_meta_box_callback( $post ) { ...
0
votes
0answers
194 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 ...
1
vote
1answer
3k views

Replacing select2 in admin backend for all selects

I originally posted this question as a javascript question here, but think maybe it would be better asked here. I tried adding select2 to all wordpress admin screens. However, since many selects are ...
2
votes
1answer
530 views

wp_dropdown_pages default value

I have a dropdown menu of pages, but after I go to a page selected, let's say "About us", the default title button of dropbown is the title of the page, "About us", so i want the title/default option ...
1
vote
1answer
536 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 ...
0
votes
0answers
504 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
329 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 ...
1
vote
2answers
2k views

How to deal with multiple select options using register_setting() theme options

I'm using Ian Stewart's Sample Theme Options for a lightweight Theme Options panel. INSERTION FAILED I need to insert Multiple categories into db, where I used the following code: <select ...
0
votes
1answer
306 views

wpdb select from using array as search parameters

Similar to how you can insert into an array using code such as $wpdb->insert( $table_name, $inputs); //where inputs is an array I want to do a sql select statement with code such as ...
0
votes
0answers
5k 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
156 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 ...