Checkboxes

Support MB Settings Page CheckboxesResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5328
    SquareNetMediaSquareNetMedia
    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,

    #5334
    Anh TranAnh 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 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.