68 posts Siiimple
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
  • Bought between 100 and 499 items
  • United States
Siiimple says

I’ve recently submitted a theme to Themeforest using checkboxes for switching layouts. I was told to use radio buttons instead. Initially I thought this was no big deal. However, I’m now stuck.

As it stands now, I have 5 different layout options and 3 different skin options. So I have to use radio buttons for both the layouts and the skins. Here’s what I did in the options panel:

$shortname = "mp"; $layout = array("1" => "Original", "2" => "Original + Left Sidebar", "3" => "Wider Images + Right Sidebar", "4" => "Large Images + No Text", "5" => "Smaller Images Gallery"); $skins = array("1" => "Original", "2" => "Cool Blue", "3" => "Just Minimal"); array( "name" => "Choose A Skin", "desc" => "", "id" => $shortname."_skins", "type" => "radio", "options" => $skins, "std" => ""), array( "name" => "Layout Options", "desc" => "Choose Your Layout", "id" => $shortname."_layouts", "type" => "radio", "options" => $layout, "std" => ""),

And this is how I’ve tried to call these options in the theme header:

<!-- Content (Layout 1)--> <?php if ((checked( isset( $mp_layouts['1'] ) ) ) && (checked( isset( $mp_skins['2'] ) ) ) ){ ?> <link href="<?php bloginfo('template_url'); ?>/_styles/skins/l1_coolblue.css" rel="stylesheet" media="screen,projection" type="text/css" /> <?php } elseif ((checked( isset( $mp_layouts['1'] ) ) ) && (checked( isset( $mp_skins['3'] ) ) ) ){ ?> <link href="<?php bloginfo('template_url'); ?>/_styles/skins /l1_justminimal.css" rel="stylesheet" media="screen,projection" type="text/css" /> <?php } elseif ( (checked( isset( $mp_layouts['1'] ) ) ) && (checked( isset( $mp_skins['1'] ) ) ) ){ ?> <link href="<?php bloginfo('template_url'); ?>/style.css" rel="stylesheet" media="screen,projection" type="text/css" /> <?php } ?>

This is not working. I’m clearly not doing something correctly. I don’t get a syntax error, I just don’t get the new layout.

Any ideas?

Thanks!

3196 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
organicbee says
just fixing formating
$shortname = "mp";
$layout = array("1" => "Original", "2" => "Original + Left Sidebar", "3" => "Wider  Images + Right Sidebar", "4" => "Large Images + No Text", "5" => "Smaller Images Gallery");
$skins = array("1" => "Original", "2" => "Cool Blue", "3" => "Just Minimal");

array( "name" => "Choose A Skin",
"desc" => "",
"id" => $shortname."_skins",
"type" => "radio",
"options" => $skins,
"std" => ""),

array( "name" => "Layout Options",
"desc" => "Choose Your Layout",
"id" => $shortname."_layouts",
"type" => "radio",
"options" => $layout,
 "std" => ""),

And this is how I've tried to call these options in the theme header:


<!-- Content (Layout 1)-->
<?php if ((checked( isset( $mp_layouts['1'] ) ) ) && (checked( isset( $mp_skins['2'] ) ) ) ){ ?>
<link href="<?php bloginfo('template_url'); ?>/_styles/skins/l1_coolblue.css" rel="stylesheet" media="screen,projection" type="text/css" />

<?php } elseif ((checked( isset( $mp_layouts['1'] ) ) ) && (checked( isset(   $mp_skins['3'] ) ) ) ){ ?>
<link href="<?php bloginfo('template_url'); ?>/_styles/skins /l1_justminimal.css" rel="stylesheet" media="screen,projection" type="text/css" />

<?php } elseif ( (checked( isset( $mp_layouts['1'] ) ) ) && (checked( isset( $mp_skins['1'] ) ) ) ){ ?>
<link href="<?php bloginfo('template_url'); ?>/style.css" rel="stylesheet" media="screen,projection" type="text/css" />

<?php } ?>
by
by
by
by
by
by