The tag has no wiki summary.

learn more… | top users | synonyms

15
votes
2answers
19k views

How to use wp_nav_menu to create a select menu dropdown?

I'm using the following inside the wp_nav_menu function to create a select dropdown menu where each menu item is an option in the select dropdown... 'items_wrap' => ...
7
votes
1answer
553 views

Assign a Class to the Current “Tag” for Formatting

Essentially what I am hoping to replicate is something like the "current-menu-item" class that is applied to WP Menus. My client is wanting to use Tags as a sub-nav, and I've managed to get the tags ...
3
votes
2answers
342 views

Tag selector like stackexchange?

I'm creating my own form based on this and I'd like to have a tag selector which is similar to the one on StackExchange. I can roll my own but I was wondering if something similar already exists. ...
3
votes
1answer
215 views

Add a select box to all widgets

I would like to add a default select box to all widgets placed in the sidebars of my site. This would allow to choose the color of the associated widget. Do you know how i can make this ? I know how ...
2
votes
2answers
3k views

Populating meta box with select-list of existing posts, and assigning it to custom post types

My question is partly based on this answer: http://wordpress.stackexchange.com/a/5778/27135 Mike's answer is really great, and the solution worked fine until I needed to include my meta box in a ...
2
votes
1answer
547 views

How do I properly format the user_role array?

I used a role editor recently and needed to delete a role. After deleting it I noticed that it began to appear as blank in the edit user role drop-down. After a bit of investigating and deleting ...
2
votes
1answer
229 views

Exclude Duplicate Posts in this SELECT Query

I have this custom select query that pulls a specified number of posts from a specific category and displays them in the order of the latest comments. The problem is that if a post has both of the ...
2
votes
1answer
81 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 ...
2
votes
0answers
120 views

Admin menu bar dropdown opens when I click on a form <select> element (Chrome) [closed]

Whenever I click on a <select> element within a form, it opens not only the relevant dropdown but at the same time the first dropdown menu of the admin menu bar. It seems to be an issue with ...
1
vote
2answers
5k views

Contact form 7 select box different value-text then content-text in option [on hold]

DSoes anyone know how I can set a different valute in the select-options in contact form 7 plugin? Here is an HTML example of what I'm trying to do <selct> <option value="1">My ...
1
vote
1answer
125 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 ...
1
vote
1answer
1k 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 ...
1
vote
2answers
480 views

Make Selected Mutiselect Items “selected”

I'm developing a theme settings panel for a new wordpress theme that have an option to exclude categories from being shown in the loop. I managed to get the main functionality to work, using a ...
1
vote
1answer
123 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
654 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 ...
1
vote
1answer
481 views

Why is my select meta data not saving?

I am working on a site at the moment where I need to save several different types of meta data for a custom post type. At present I have a text input that is saving with no problem but am struggling ...
1
vote
1answer
106 views

How to get a list of taxonomy terms which are being used only within certain post types?

I have a custom taxonomy called 'locations' which is being shared across a bunch of post types. I want to make a select field dropdown list of my locations (terms) to let users go to the taxonomy term ...
1
vote
1answer
733 views

Widget: Custom Post Type Post Listing Dropdown on Admin Side

Widget: I'm making a custom widget with the following functionality on the admin side. 3 text fields 2 dropdown menus to select posts by title (both from a single custom post type) Right now, ...
1
vote
1answer
586 views

How can I populate a select element with terms from a custom taxonomy and filter post results?

Alright, so first, I need you to check out this wire-frame so you can see what I'm trying to accomplish: Wire-frame What I've done so far is this: I created a custom post type for individual ...
1
vote
1answer
122 views

MySQL Rank & $wpdb

I need a rank column in my MySQL statement, for example: SET @rank=0; SELECT @rank:=@rank +1 as rank, player, points FROM my_table Is there a way to use the above with $wpdb? WordPress doesn't ...
1
vote
1answer
82 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 ...
1
vote
1answer
650 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
203 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
193 views

How to dynamically save a selected option from page “Templates” selectbox?

When I select a template for a page from the "Templates" selectbox, the selected item gets “value=selected” only after I hit save draft/publish/update. <option value='template-gallery.php' ...
1
vote
0answers
232 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
172 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 ...
1
vote
2answers
454 views

How to display custom style based on theme option select box

How can I display a different style snippet if a user selects and option from my theme options page select box. For example. To show the sidebar on the right a user would select "Right" and the ...
0
votes
2answers
2k views

How to Query Database for posts with certain Taxonomy Term

I want to write a select query to return data on only posts which have are associated with the taxonomy term food-and-beverage SELECT wp_postmeta . * , wp_posts.post_name FROM wp_posts, wp_postmeta, ...
0
votes
1answer
94 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
3answers
741 views

How to select one major category (or custom taxonomy) for a custom post type?

I've created a hierarchical custom taxonomy (genre) and want to use it for a custom post type (radio station). But I don't only want to assign some genres to a radio station. I also want to be able to ...
0
votes
2answers
173 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
311 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
51 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
1answer
242 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
236 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 ...
0
votes
1answer
284 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
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 ...
0
votes
1answer
226 views

Select From wpdb - Author/User Directory page

I am working on a wordpress site where I have created a directory page(authors.php) that lists all users and certain author meta. It works fine however I am trying to figure out how to only show ...
0
votes
1answer
579 views

Theme Option select values

I'm building a theme options panel and so far been successful, except with the "Select" type option. This is my code: array( "name" => "Transition", "desc" => "Choose the type of ...
0
votes
2answers
459 views

In widget, the value of select field doesn't get updated, changes after saving

I'm building a simple widget which will allow the user to select a post among a list of posts. For some reason, when I select an option, I believe it actually gets selected but the option doesn't ...
0
votes
1answer
306 views

Compare current post Category in select menu

i have done this many times but not via a form so i am getting a weird issues when trying to assign a "selected" based on the current post term id... Maybe the use of get_the_category and then ...
0
votes
2answers
702 views

Help with a get_categories () drop down menu - I want it to show in heirachial form

I have a drop down menu that displays all of the terms for one of my custom taxonomies using get_categories (). It displays fine in alphabetical form. However, what i want to know is how can i have ...
0
votes
1answer
2k views

Selecting multiple options onclick

I have a bunch of options that I'd like the user to be able to change in bulk. Here's my code example. When this option selection changes, <label>Default author</label> <select ...
0
votes
1answer
764 views

SELECT field options disappear when saving widget

I'm having an interesting problem that I can't seem to solve. While creating a widget, I have created a select field with options that can be chosen on the widget screen. It all works perfectly fine, ...
0
votes
0answers
14 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
15 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
19 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
109 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 ...
0
votes
1answer
26 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 ...
0
votes
0answers
18 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 ...