Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
01-03-2012, 11:01 PM #1
- Join Date
- Jul 2009
- Thanked 0 Times in 0 Posts
if statement to change content div size
Edited to add:
I may have posted this prematurely, it appears to be working on some pages but not others and I can't work out if it's a cache issue now or not.
i have an if statement to identify what page the user is viewing. if they're on x or y page, the main content will display at 1000px. if the user is on any other page it will display at 800px wide with a sidebar.
the statement seems to be working in as far as the sidebar only shows on every other page - but the content isn't resizing to 800px.
the url is www.aliciahannahnaomi.com - you'll need to log in to view the site as it's currently in maintenance mode.
the pages that should be affected with the sidebar and smaller content div are "shop" and most of the pages within the shop.
the code I'm using is:
elseif (is_page('13')): ?>
<?php else : $div="<div id='contentSidebar'>";?>
<?php if( is_active_sidebar( 'widget-shopp' ) ) :?><div class="widget-area"><?php endif;
dynamic_sidebar( 'shopp' );
if( is_active_sidebar( 'widget-shopp' ) ) :?></div><?php endif;?>
<?php endif; ?>
<div <?php post_class(); ?>>
<?php get_template_part('format', 'page');?>
Last edited by aliceinwonderla; 01-03-2012 at 11:04 PM.