• I am creating a wordpress theme with a theme management page in wp-admin where there is an option to give the author (me) credit by a linkback. This is done using a checkbox. All options are working fine even the checkbox…. BUT it always shows “unchecked” in the theme option page even when the condition is true.

    Please help me solve this issue.

    Codes:

    array(	"name" => "Show Credit",
    	"desc" => "This is if you wish to show Author's Credit",
    	"id" => $shortname."_credita",
    	"type" => "checkbox",
    	"std" => "true",
    	),

    Theme Option page HTML

    case "checkbox":
    ?><tr>
    <td width="20%" rowspan="2" valign="top"><strong><?php echo $value['name']; ?></strong></td>
    <td width="80%"><? if(get_settings($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = ""; } ?>
    <input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />
    </td></tr>

The topic ‘Checkbox issue in wp-admin’ is closed to new replies.