Custom category.php Page Not Working

Community Forums Forums Design Tips and Tricks Custom category.php Page Not Working

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Susan 1 year, 12 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #65053


    Dear 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:

    Sub Category:

    Here 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 -->
    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-->
        do_action( 'genesis_after_endwhile' );
    add_action( 'genesis_loop', 'rock_custom_loop' ); remove_action( 'genesis_loop', 'genesis_do_loop' );

    I hope you can see the issues. Pagination + Sub Categories are displaying correctly.

    Thank you for your time,





    As 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!

    Susan @ One Happy Studio I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

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

You must be logged in to reply to this topic.