69 posts Siiimple
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has referred 100+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
+4 more
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!

3436 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
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 } ?>

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by