This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 2 years, 6 months ago.

  • Creator
    Topic
  • #5328
    Resolved
    SquareNetMedia
    Participant

    Im using a checkbox on the setting page, how do I use it within the templates

    I have tried using

    if (isset( $settings[$preloader] ) ) {
            echo '<div id="preloader">';

    but doesnt seem to work,

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #5334

    Anh Tran
    Keymaster

    Hi,

    Did you get the $settings first, like shown in the documentation?

    $settings = get_option( 'option_name' );
    $field_id = 'your_field_id';
    if ( isset( $settings[$field_id] ) ) {
        echo '<div id="preloader">';
    }
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.