Display value of drop down box
-
Hi,
Currently I am using this php code to display Text for a Custom Field with Name ‘years’ in a theme in wordpress, that works wellphp echo get_post_meta($post->ID, ‘years’, true); (Including the php opening and closing tags)
But the problem I have is that if I want to change this from Text, to a Drop Down Box (a select2 type), with different values to choose from, I cannot find how to display the values correctly.
Any body has any idea of how to display correctly the value of a custom field froma Drop Down selec2 type ?
Thanks for any help on this
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘Display value of drop down box’ is closed to new replies.