IF condition for wordpress dropdown settings api
-
Hi,
I have set up a settings api using this tutorial,
https://alisothegeek.com/2011/04/wordpress-settings-api-tutorial-follow-up/And having this setting which adds a dropdown box to choose between “catalog” and “shopping cart”,
$this->settings['store_type'] = array( 'section' => 'general', 'title' => __( '<b>Store Type</b> <a href="#"><img src="https://cdn4.iconfinder.com/data/icons/Sizicons/12x12/question_blue.png" border="0" /></a>' ), 'desc' => __( 'Choose the type of your store' ), 'type' => 'select', 'std' => 'Shopping Cart', 'choices' => array( 'cart' => 'Shopping Cart', 'catalog' => 'Catalog', ) );
I wanted to have an if condition or any solution like,
if “catalog” is selected {
// do anything as catalog.
} elseif “shopping cart” is selected {
// do anything as shopping cart.
}Please help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘IF condition for wordpress dropdown settings api’ is closed to new replies.