• Please help me as I create a checkbox that saves the value in real time and that appears on all pages if clicked or not.
    From already I thank you
    Sorry bad English

    
        <div class="toggle">
            <label>
              <input id="checkValue" name="checkbox" type="checkbox" />           
              <span class="slider"></span>
            </label>
        </div>
        
        <?php
            
        
        if(isset($_POST['checkbox'])) {
            update_post_meta( 1, 'metakey', 'meta_valor1' );
        } else { 
            update_post_meta( 1, 'metakey', 'meta_value2' );
        }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Checkbox that saves real-time value’ is closed to new replies.