• 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

archive page with separate category lists

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 › General Discussion › archive page with separate category lists

This topic is: not resolved

Tagged: category archive

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 8 months ago by d777.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • September 8, 2015 at 8:58 am #164915
    d777
    Participant

    I am using an old custom page_archive.php to display the last 5 articles (and then a more >) of my categories, in place of the usual category page that also display pages and authors etc.

    The old code is dropping the background on the newer version Agency Pro theme and making the page look awful.

    Can't figure out if I need to completely redo, or if I just need to tweak page layout.

    Current code below.
    Thanks.

    <?php
    /**
    * Template Name: My Special Category Archive
    */
    get_header(); ?>

    <?php genesis_before_content_sidebar_wrap(); ?>
    <div id="content-sidebar-wrap">

    <?php genesis_before_content(); ?>
    <div id="content">

    <?php genesis_before_loop(); ?>
    <div class="post entry">

    <!--page_archive.php -->
    <h1 class="entry-title"><?php _e("Article Archive", 'genesis'); ?></h1>

    <div class="entry-content">

    <?php $categories = get_categories( $args );?>
    <ul class="catArchive">
    <?php foreach ($categories as $category) {
    $catCounter++;

    $catLink=get_category_link($category->term_id);
    $catStyle = '';
    if (is_int($catCounter / 2)) $catStyle = ' class="catAlt"';

    echo '<br /><li'.$catStyle.'><h2 style="border-bottom: 0px;">name.'">'.$category->name.'</h2>';
    echo '

      ';

      query_posts('cat='.$category->term_id.'&showposts=5');?>

      <?php while (have_posts()) : the_post(); ?>

    • " rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?>
    • <?php endwhile; ?>

    • " title="<?php echo $category->name; ?>">More <?php echo $category->name; ?> »

    <?php } ?>

    </div><!-- end .entry-content -->

    </div><!-- end .post -->
    <?php genesis_after_loop(); ?>

    </div><!-- end #content -->
    <?php genesis_after_content(); ?>

    </div><!-- end #content-sidebar-wrap -->
    <?php genesis_after_content_sidebar_wrap(); ?>

    <?php get_footer(); ?>

    September 8, 2015 at 6:57 pm #164976
    Brad Dalton
    Participant

    All the PHP code you posted is broken.

    Please use Github Gists to embed code. Thanks.


    Tutorials for StudioPress Themes.

    September 8, 2015 at 7:06 pm #164978
    d777
    Participant

    posted it here:
    https://github.com/d777/genesis-category/blob/master/page_archive.php

    THANK YOU for looking

    September 9, 2015 at 12:05 pm #165043
    d777
    Participant

    turns out to have been an easy fix

    <div id=”content-sidebar-wrap”>

    really needed to be
    <div class="content-sidebar-wrap">

    doh!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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