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 10 months, 3 weeks ago.

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

    William
    Participant
    Post count: 12

    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:

    http://i44.tinypic.com/359gzn9.png

    Sub Category:

    http://i42.tinypic.com/33ux1yq.png

    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 -->
    
    <?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

    #76493

    Susan
    Moderator
    Post count: 9255

    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 @ Graphically Designing 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.