Questions tagged [select]
The select tag has no usage guidance.
178
questions
2
votes
1answer
297 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' ...
2
votes
1answer
260 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 ...
4
votes
3answers
12k views
0
votes
2answers
2k 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 ...
1
vote
0answers
469 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
437 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
3answers
2k 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
1answer
1k 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 _the_category and then ...
10
votes
2answers
79k views
Contact form 7 select box different value-text then content-text in option [closed]
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 car</...
1
vote
2answers
7k 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, ...
3
votes
1answer
297 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 ...
0
votes
1answer
87 views
How can we select attachements based on Caption?
I am trying to select some attachements based on an attachement caption. I need to do this for a seperate download page. On the download page i want to display all attachment which caption equals "...
1
vote
1answer
2k 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
2k 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:
What I've done so far is this:
I created a custom post type for individual addresses.
I ...
-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
...
0
votes
2answers
2k 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 ...
1
vote
2answers
1k 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
1answer
771 views
Form Value of drop down category + Translation of 'show option none'
I am building a form where a user can submit an article from the front end..
So far so good...
To this form i am doing some submission check using javascript..
When i get to check if a category is ...
22
votes
3answers
48k 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' => '<select>%3$s</select&...
1
vote
1answer
158 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
3answers
7k 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 ...
0
votes
1answer
5k 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 name=...
2
votes
0answers
140 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 ...
0
votes
1answer
1k 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, ...
3
votes
2answers
981 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.
...
2
votes
1answer
797 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 ...
7
votes
1answer
843 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 ...
2
votes
1answer
243 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 ...