• virgild

    (@virgild)


    Can someone please help me turn this input into a check box?

    <tr valign="top">
    	<th scope="row">
    		<label for="blogname">Option Label</label>
    	</th>
    	<td>
    		<input name="theme_option" type="text" id="theme_option" value="<?php echo get_option('theme_option'); ?>" class="regular-text" />
    	</td>
    	</tr>

    It’s for a basic theme option. I tried “checkbox name” but nothing appears.

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    <input name="theme_option" type="checkbox" id="theme_option" value="<?php echo get_option('theme_option'); ?>" class="regular-text" />

    Thread Starter virgild

    (@virgild)

    Thanks! that was so amateur of me..lol

    Would you happen to know why an option won’t register? The checkbox appears in my theme’s option but when I check it and save, it remains blank.

    I proof read the coding several times.. all other options work but the checkbox. Not sure what can be causing this.

    Thread Starter virgild

    (@virgild)

    Ok I figured it out. Under register_my_settings I didn’t have the new option listed on the same row as the functions HTML

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘making checkbox’ is closed to new replies.