• adiofm

    (@adiofm)


    My logic is this:

    If it’s the homepage, show the side bar a specific way (with added code) if it’s not the homepage just use the dynamic sidebar. The problem I’m having is that it doesn’t recognize that it’s on the home page. I’m using a static page called Home set in Settings>>Reading within the wordpress options.

    Here’s my code:

    <?php if ( is_front_page() ) { ?>	
    
    			<div id="portfolio">
    
    		<div class="title">
    			<div class="fix"></div>
    		</div><!-- /title -->
    
    		<?php $counter = 0; ?>
    		<?php query_posts('cat=' . $GLOBALS[portfolio_cat] . '&showposts=' . get_option('woo_portfolio_posts') ); ?>
    
    		<?php if (have_posts()) :  while (have_posts()) : the_post(); $counter++; ?>
    
    		<?php
    
       		$layout = ('1col.php');
    
    			include( TEMPLATEPATH . '/portfolio-layouts/' . $layout );
    
    		?>
    
    		<?php endwhile; endif; ?>
    
    		<div class="fix"></div>
    
    	</div>
    
    	<?php } else { ?>
    
                <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar(1) )  ?>		           
    
    	<?php } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    (@esmi)

    Try:

    <?php if ( is_front_page() || is_home() ) { ?>

    Thread Starter adiofm

    (@adiofm)

    Just tried your suggestion esmi.

    It still just doesn’t recognize that it’s on the page.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Conditional Sidebar not recognizing home page’ is closed to new replies.