WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 choosen

This is the line the retrives categories in the form:

<?php wp_dropdown_categories('show_option_none=---------------->&taxonomy=category&hide_empty=0&name=cats[]&orderby=name&hierarchical=1'); ?>

I dont know how to check it.. what is the value being sent to wordpress? Also.. Can i change this:


into somthing i can translate using the regular tranlation method aka __() or _e()??

Thanks guys

share|improve this question
up vote 0 down vote accepted

Ok... as thing go when your trying to solve somethimg you have no peace until its fixed so.. i went ahead and did some clear mind thinking (after a night sleep) and got that i can check the HTML for the values returen.

Just wanted to share incase anyone stumbles with the need for this info

This:<?php wp_dropdown_categories('show_option_none=---------------->&taxonomy=category&hide_empty=0&name=cats[]&orderby=name&hierarchical=1'); ?>

Returns a value of the category number for each select item which is easy to check.

Also.. about the translation part this is the right way to do that..

$choosecatmsg = __('Choose A Category', 'blue_article_demon');                      

Thanks for anyone who took a look while i was stuck :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.