I am trying to search for specific options (my_option_…) and print them in rows.
I have been testing things for a while now and I cannot find a solution. Using (search_terms=my_option_) seems not to work.
Is there an easy way to implement this?
<?php
add_option('my_option_1', 'Option 1');
add_option('my_option_2', 'Option 2');
add_option('my_option_3', 'Option 3');
?>
<?php
$option1 = get_option('my_option_1');
$option2 = get_option('my_option_2');
$option3 = get_option('my_option_3');
if ( get_option('search_terms=my_option_')){ //???
echo "Multiple Found!!";
while(get_option('search_terms=my_option_')) {
echo "options"; //???
}
}
if ( get_option('my_option_2')){
echo "my_option_2 Found!!";
}
?>