Support » How-To and Troubleshooting » [Resolved] how to use get_option function?
2 years, 4 months ago
i have crate a menu under setting then i create two fields there
1. slide width
2. slide height
my slide width id is width
my slide height id is height
now i want to get these value which i have saved in the above two.
i try <?php echo get_option(‘height’);?>
but its give me an empty value.
any one which have idea about this.
i think i am passing wrong value in get_option
height is my id of slide height.
look in your wp_options table to see what the value is saved as… it might be being saved as slide_width and slide_height … so when you get ‘height’ it doesn’t exist
this was not my problem.
i have solved it.
<?php $options = get_option( 'spyro_slider_settings' );?>
<?php echo $option['height'];?>