• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Custom category.php Page Not Working

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: not resolved

Tagged: category.php, grid loop, loop, pagination, wp-query

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 7 months ago by Susan.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 1, 2013 at 11:03 pm #65053
    William
    Member

    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


    Genesis Customization Service | Quick fixes whenever you need them ! | Contact me at Fixmysite.com !

    December 1, 2013 at 3:26 pm #76493
    Susan
    Moderator

    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!

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble