• Hello everybody. Okay so in my options page for my WordPress theme I would like to create a checkbox that would be for gravatars. If you check it, they’re shown, if not, then obviously they’re not.

    I know how to do regular options, but I have no idea how to do this. Here’s what I’ve got from other resources on the internet but haven’t been able to do this.

    array( "name" => "Gravatar",
    	"desc" => "Check if you would like Gravatars or not",
    	"id" => $shortname."_gravatar",
    	"type" => "checkbox",
    	"std" => "false"),

    and then for the index.php

    <? if get_option('$spress_gravatar') { ?>
    <? echo get_option('$spress_gravatar_display'); ?>
    <? } else { ?>
    <? echo get_option('$spress_gravatar_no'); ?>
    <? } ?>

    I have no idea if that’s right, but if ANYONE can help me out it would a tremendous help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to create a checkbox option for WordPress themes’ is closed to new replies.