• I have created an Options Panel in my theme that is working quite well. I’m trying to add a option where if the user checks it, the loop is no longer shown. It seems to be working fine on the options panel, however I’m having trouble retrieving the loop based on the user’s selection.

    here is the code I’m using on the functions.php file:

    array( "name" => "Disable Home Text and Image",
    	"desc" => "check this box if you would like to DISABLE the home page text block and image",
    	"id" => $shortname."_home_disable",
    	"type" => "checkbox",
            "std" => "false"),

    again – that part is working fine and showing up on the options panel as expected.

    Here is the code I’m using to retrieve the results, but the loop doesn’t show up whether the box is checked or not. If the box is checked I would like the loop not to show up. If it is not checked, I want it to show.

    <?php if (get_option('fs_home_disable == "false"') ) { ?>
    
    	 <div class="exerptpost">
    
    <?php echo the_post_thumbnail(array(230,230), array('class' => 'archimg')); ?><h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1><div class="entrydate"><?php the_time('l, F jS, Y') ?> </div>
         <p><?php echo excerpt(40); ?></p>  </div>
    
        <? } else { ?>      <? } ?>

    Thanks in advance for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding an option in a Options Panel’ is closed to new replies.