Wordpress categories redirecting to index.php -
hello , day all!
i started developing wordpress theme scratch, , seemed going far. have small problem. when click on 1 of post categories in default wp sidebar, redirected index.php, despite fact link referencing exact name of category.
how can fix that, when click category, posts in category?
my guess must problem archive.php page or that. new of this, please excuse question.
big in advance!
so managed fix problem anstrangel0ver's refference category.php file, led me http://bit.ly/1umc6uc , code there has little mistake fixed, here is:
i must place in category.php file in order me fix issue:
<?php /** * simple category template */ get_header(); ?> <section id="primary" class="site-content"> <div id="content" role="main"> <?php // check if there posts display ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="permanent link <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('f js, y') ?> <?php the_author_posts_link() ?></small> <div class="entry"> <?php the_excerpt(); ?> <p class="postmetadata"><?php comments_popup_link( 'no comments yet', '1 comment', '% comments', 'comments-link', 'comments closed'); ?></p> </div> <?php endwhile; ?> <?php else: ?> <p>sorry, no posts matched criteria.</p> <?php endif; ?> </div>
note: generic file structure, has me modified according needs.
Comments
Post a Comment