is_home() == true, on archive page?
-
I’m using an adaptation of Charlie’s Hemmed theme. Essentially it has an include for a file named “bottombar.php.” I’m attempting to utilize The Popularity Contest plugin to echo specific archive information in one of the columns of this bottom bar. Here’s the code:
<?php if (is_home()) { ?> <h2><?php _e('Most Popular'); ?></h2> </div> <ul><?php akpc_most_popular(); ?></ul> <?php } elseif (is_month()) { ?> <h2>Most Popular in <?php the_time('F Y'); ?></h2> </div> <ul><?php akpc_most_popular_in_month(); ?></ul> <?php } elseif (is_category()) { ?> <h2>Most Popular in '<?php single_cat_title(); ?>'</h2> </div> <ul><?php akpc_most_popular_in_cat(); ?></ul> <?php } ?>
Trouble is, for some reason is_home() is true no matter what page I hit within my site.
example 1: (actual home page)
http://www.iddream.comexample 2: (category archive page)
http://www.iddream.com/category/brilliant-mistake/The code above should replace ‘Most Popular’ on the home page with ‘Most Popular in Brilliant Mistake’ on the category archive page right?
I’m new to WordPress, is there something I overlooked?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘is_home() == true, on archive page?’ is closed to new replies.