Works in category but not on index
-
The navigation works on category section, but it doesn’t work on the homepage. It stays the same.
Here’s the code:
<h2 class="page-title"></h2> <?php $theme->hook('content_before'); ?> <?php query_posts('cat=6&showposts=2&offset=1'); ?> <?php $is_post_wrap = 0; if (have_posts()) : while (have_posts()) : the_post(); /** * The default post formatting from the post.php template file will be used. * If you want to customize the post formatting for your homepage: * * - Create a new file: post-homepage.php * - Copy/Paste the content of post.php to post-homepage.php * - Edit and customize the post-homepage.php file for your needs. * * Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part */ $is_post_wrap++; if($is_post_wrap == '1') { ?><div class="post-wrap clearfix"><?php } get_template_part('post', 'homepage'); if($is_post_wrap == '2') { $is_post_wrap = 0; ?></div> <a href="http://selfexceed.com/category/blog/"><img style="border: 0px solid ; width: 327px; height: 132px;" alt="self improvement blog" src="http://selfexceed.com/wp-content/uploads/2012/12/Blog.png"></a><a href="http://selfexceed.com/category/videos/"><img style="border: 0px solid ; width: 327px; height: 132px;" alt="self improvement videos" src="http://selfexceed.com/wp-content/uploads/2012/12/Video.png"></a> <?php } endwhile; else : get_template_part('post', 'noresults'); endif; if($is_post_wrap == '1') { ?></div><?php } get_template_part('navigation'); ?> <?php $theme->hook('content_after'); ?> </div><!-- #content --> <?php get_sidebars(); ?> <?php $theme->hook('main_after'); ?> </div><!-- #main -->
I think it has to do with this code here
<?php query_posts('cat=6&showposts=2&offset=1'); ?>
I implemented this code in order to exclude a category and ever since then, goign to page 2, 3, and etc all stays the same.
my website is http://selfexceed.com.
Appreciate any help that I can get!
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Works in category but not on index’ is closed to new replies.