Community Forums › Forums › Archived Forums › Design Tips and Tricks › Custom category.php Page Not Working
Tagged: category.php, grid loop, loop, pagination, wp-query
- This topic has 1 reply, 2 voices, and was last updated 11 years, 11 months ago by
Susan.
-
AuthorPosts
-
October 1, 2013 at 11:03 pm #65053
William
MemberDear Genesis Enthusiasts,
I am in a pickle and I would greatly appreciate if someone can shed some light on my situation.
Under "Settings" => "Reading", I have set "Blog pages show at most" to 6.
I have created a category called 1970s where one can see all the best rock albums of the decade -> Meanwhile, I have created subcategories (1970, 71, 72, 73 etc...) where one can see the best rock albums of the respective year.
Here is the problem(s), in the subcategories I am getting exactly the same same results as in the parent category + pagination is not working.
Pictures of the problem:
Parent Category:
http://i44.tinypic.com/359gzn9.png
Sub Category:
http://i42.tinypic.com/33ux1yq.pngHere is the code in the category.php:
function rock_custom_loop() { ?> <header class="category_title_wrap"> <h1 class="gold_title">The Verybest of the: <?php echo single_cat_title( '', false ) ?></h1> <?php if ( category_description() ) : ?> <div class="category_description"><?php echo category_description(); ?></div> <?php endif; ?> </header><!-- category_title_wrap --> <?php global $post; $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'paged' => get_query_var( 'paged' ) ); global $wp_query; $wp_query = new WP_Query( $args ); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="w_one_fourth"> <div class="postimage"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumb-2'); ?></a> <div class="blackframe"> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> </div><!-- blackframe --> </div><!-- postimage --> </div><!-- w_one_fourth--> <?php endwhile; do_action( 'genesis_after_endwhile' ); endif; wp_reset_query(); } add_action( 'genesis_loop', 'rock_custom_loop' ); remove_action( 'genesis_loop', 'genesis_do_loop' ); genesis();I hope you can see the issues. Pagination + Sub Categories are displaying correctly.
Thank you for your time,
Regards,
Will
Genesis Customization Service | Quick fixes whenever you need them ! | Contact me at Fixmysite.com !
December 1, 2013 at 3:26 pm #76493Susan
ModeratorAs you asked this question a while back, I hope you were able to get it resolved. If not, please report back here, and I will escalate for you. Thanks!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.