WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how to use get_option function? (3 posts)

  1. Spyro webz
    Member
    Posted 1 month 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.

  2. Bart Dabek
    Member
    Posted 1 month ago #

    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

  3. Spyro webz
    Member
    Posted 1 month ago #

    Hello

    this was not my problem.

    i have solved it.
    by

    <?php $options = get_option( 'spyro_slider_settings' );?>
    <?php echo $option['height'];?>

Reply

You must log in to post.

About this Topic