Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
68 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
28 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
25 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
22 views

Custom Post Type Meta Select Box Get URL for Roya Slider

I'am using a snippet i got from here: Populating meta box with select-list of existing posts, and assigning it to custom post types Mikes Code works great and does what i want: Display a MetaBox at ...
0
votes
0answers
47 views

Simple WP Plugin with plugin settings page

I need to create a plugin with only one select on his settings page and save select value. I have a select with all register menus and I can not to save my select value. What am I doing wrong? What ...
-3
votes
1answer
39 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
51 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__ ), ...
0
votes
0answers
44 views

Wordpress plugin, listing posts in admin and having correct title/selected value

I'm making a plugin that is used to display a single post in a widget area. I can get the front end working just fine, but in the Admin area (Widgets page and customizer) I'm having some issues. I ...
-1
votes
1answer
49 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
38 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
25 views

Get the parameter, compare it in the array, check and display

I have: Wordpress custom post types; Two hotels registered in the custom Wordpress admin area; A variable named $hotels which get the field where the hotels registered are listed; The hotels are ...
0
votes
0answers
23 views

Get parently level taxonomy based on published posts that have child taxonomy?

I have a CPT Properties and a taxonomy Regions. So a Region is something like: Florida South Gulf Coast Anne Marie Islands Cape Coral Generally only the third level will ever be selected in a ...
0
votes
1answer
366 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
77 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
207 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
21 views

Multiple post selection

I want to enable my users to select multiple posts from a grid display of content. the selection will be used to make a bulk action based on the selection (for example - send an e-mail to all post ...
0
votes
0answers
140 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
136 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
92 views

Sort taxonomies in select dropdown with topmost parents as optgroups

I have an array of objects with custom taxonomy terms. This taxonomy represents a list of countries/states/cities which are being used by a certain post type and other parameters (I'm not using a ...
0
votes
0answers
338 views

List posts in a select tag and display the_content of the selected option

I would like to create a select tag with posts from my custom post type and then, when an option is selected, I need to get the_content() from that selected post by its ID and display the content ...
0
votes
0answers
34 views

How to put a select option in jigoshop checkout?

Am I doing the right thing guys? Please help me. What I want to happen is to put a shipping time in billing address. Help me please. Thanks array( 'type' => ...
0
votes
2answers
364 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
78 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
2k 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
95 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
355 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
1answer
473 views

wp_dropdown_pages auto submit

What I have below currently works fine except for one issue: When a select item is chosen, it will correctly go to the subpage - however, if on a sub-page of the main site already, and a item is ...
0
votes
1answer
64 views

Help me SELECT thumbnail from SQL and use

//MySQL Username $user = "myuser"; //MySQL Password $pass = "mypass"; //MySQL Database Name $database = "mydb"; //Number of posts you want to have appear $numOfPosts = 7; //Setup connection $mysqli = ...
0
votes
0answers
54 views

How to make a call to DO_ACTION on Select List Change

Within a wordpress page (that is using a default template), I have a select/drop-down field that, when the user selects an item, I would like to somehow have it trigger a do_action call, right at this ...
0
votes
0answers
64 views

Multiple Select Boxes Settings API

I know how to do select boxes, those are easy - but how would you do multiple select boxes? where you can select and save multiple things? Would you still use the selected() function? if so can some ...
2
votes
1answer
885 views

Get all posts from custom post type and insert in select input as metabox

I would like to know if its possible to do something like this. I have Slider custom post type and Services custom post type. For slider posts I have created a metabox for URL value to display next ...
1
vote
1answer
153 views

Retain select value in select box

How are you all. I am just struggling to make my custom select box keep retain select value in form when page is reload or user come on form via different navigation. my select box is: <?php ...
0
votes
1answer
336 views

Widget select option not saving

I do this widget but the selected options dont saving when updated. This is the code: /* CUSTOM POSTS LIST */ class Posts_list extends WP_Widget { function Posts_list() { /* Widget ...
0
votes
1answer
316 views

Select post from dropdown and add query args not working

The behavior of the below should be that the user makes a selection on the dropdown box and the page refreshes with a query arg of editevent=1 and also passes a value of the post ID with the selection ...
2
votes
1answer
116 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 ...
0
votes
1answer
376 views

Select Form Element Not Saving from Plugin Options

I am certain it is something silly. But I can't find it and with such simple code at a loss for anything else. Having looked at many other plugins doing settings in a lot of ways can't really see ...
0
votes
0answers
229 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 ...
1
vote
1answer
265 views

How to make checkboxes from taxonomy terms?

I can populate selectbox options like this: <?php $args = array( 'taxonomy' => array( 'country', ), 'hide_empty' => 0, ...
1
vote
1answer
181 views

Custom profile field with birthday. Troubles with <select>

I made custom profile fields for birthday data. function my_user_field( $user ) { $birthday_day = esc_attr( get_the_author_meta( 'birthday_day', $user->ID ) ); ...
1
vote
1answer
781 views

Filter Select results based on selection

I am trying to filter which job results are rendered to the page whenever the user changes the select item on my form. The select items are dynamically populated by the code below which assigns them a ...
0
votes
1answer
131 views

Select Menu for Custom post Type does not save

I posted a discussion on CSS-Tricks the other day. Explaining that my Videos were not displaying on my Video page from my custom post type that I created using this tutorial. I thought I fixed the ...
0
votes
1answer
118 views

Add “Select All” to custom taxonomy

Is it possible to add a "Select All" to a custom taxonomy for my custom post type? A project I'm working on requires the option to be able to select all of the taxonomy terms. While I could go through ...
0
votes
1answer
244 views

How do I capture the selected option and pass in sending the registration form?

I'm customizing the WordPress registration form, and I need to display an list of options from a select on form submission. I was using the following code to capture the selected option of the ...
0
votes
1answer
192 views

Repeatable custom meta select boxes

I am working on meta fields for a custom post type storing match data. I have two sepearte meta boxes one which the team and the score are chosen and the values are submitted. The second takes that ...
0
votes
0answers
84 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
3answers
161 views

Create a page selector using taxonomies

I have created a custom post type and assigned a term from a custom taxonomy to each page within this CPT. I want to create two select boxes on the front end of my site. I want the 1st select box to ...
-2
votes
1answer
188 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 ...
-1
votes
3answers
3k views

Woocommerce: Changing the variations select default value? [closed]

At my site i want to change the default value of the selecter that appears, when different variations exists. If anyone can give me a clue of how and where this is done, it would be highly ...
1
vote
1answer
2k views

Custom widget using get_categories select menu dropdown

I have created a custom widget that is supposed to display a select menu with all the categories the blog has. I have used get_categories to compile the list. This works fine and all categories appear ...
0
votes
1answer
65 views

Add a select-option to the default widgets

I would like to add an extra feature to one of the default widgets so that the user can choose from the select-field to either align the widget to the left, center or to the right. How would I be ...