The tag has no wiki summary.

learn more… | top users | synonyms

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
67 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 ...
1
vote
1answer
632 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 ...
0
votes
2answers
2k views

Get selected value with PHP and jQuery

I have form that i'm using to update user profile from front end and i have country select. <form method="post" id="adduser" action="<?php the_permalink(); ?>"> <select id="te" ...
-1
votes
1answer
1k views

Output dropdown results into Woocommerce Order details

How do I correctly get the data from a drop down (select) output into the Woocommerce Order Details section of the admin? When I do this, I get an output for all my text box questions, but nothing ...
0
votes
1answer
234 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
687 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 ...
2
votes
2answers
4k 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 ...
0
votes
1answer
54 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 ...
-1
votes
1answer
655 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
vote
1answer
206 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
1answer
121 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 ...
0
votes
3answers
1k views

How to check if page has status published

How to check if page id(SomeID) is actually published?
0
votes
2answers
528 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
257 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
189 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
844 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
347 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 ...
1
vote
2answers
8k 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 ...
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, ...
3
votes
1answer
228 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
85 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
827 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
645 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
votes
1answer
108 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
784 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
493 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
384 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 ...
15
votes
2answers
21k 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' => ...
1
vote
1answer
127 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
2answers
572 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
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 ...
2
votes
0answers
122 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
819 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
389 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
575 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
591 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
230 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 ...