• 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

Creating a custom category template

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 › Creating a custom category template

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 10 years, 7 months ago by michaeloeser.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 25, 2014 at 9:04 am #132755
    michaeloeser
    Member

    Hi everyone,

    I haven´t worked with Genesis for a while and now I need to create a custom category template for a new Genesis child theme. In a former child theme (XHTML syntax) I used a file category-big-data.php (for the category "big-data" obviously) with this code:

    <?php get_header(); ?>
    
    <?php genesis_before_content_sidebar_wrap(); ?>
    <div id="content-sidebar-wrap">
    
    	<?php genesis_before_content(); ?>
    	<div id="content" class="hfeed">
    
    		<?php genesis_before_loop(); ?>
            <!-- Category sponsoring Logo or Banner -->
             <div align="left"><a href="http://applications.teradata.com/automotive/home/.ashx" target="_blank"><img src="http://www.automotiveit.eu/shared-assets/subnets/logo-terradata.jpg" /></a></div> 
            
    		<?php $i=1; if (have_posts()) : while (have_posts()) : the_post(); // the loop ?>
    
    			<?php genesis_before_post(); ?>
    			<div <?php post_class(); ?>>
                                
    				<?php genesis_before_post_title(); ?>
    				<h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    				<?php genesis_after_post_title(); ?>
    
    				<?php genesis_before_post_content(); ?>
    				<div class="entry-content">
    				<?php
    					if(genesis_get_option('content_archive') == 'full') :
    						the_content(__('[Read more...]', 'genesis'));
    					else :
    					if(genesis_get_option('thumbnail'))
    					genesis_image(array('format' => 'html', 'size' => genesis_get_option('image_size'), 'attr' => array('class' => 'alignleft post-image')));
    					the_excerpt();
    					endif;
    				?>
    				</div><!-- end .entry-content -->
    				<?php genesis_after_post_content(); ?> 
                    
                    	<?php if($i == 3 ) : ?>
    			<!-- Banner 2 -->
        	<?php
     			// Include the category rectangle (or other) ad
    			  	//include(CHILD_DIR.'/inc/plm-ad.php'); 
    			 	 ?>
        
    	<?php endif; ?><!-- end if Abfrage für Banner -->
    
    			</div><!-- end .postclass -->
    			<?php genesis_after_post(); ?>
    
    		<?php $i++; endwhile; // end of one post ?>
    		<?php genesis_after_endwhile(); ?>
    
    		<?php else : // if no posts exist ?>
    		<?php genesis_loop_else(); ?>
    			<p><?php _e('Sorry, no posts matched your criteria.', 'genesis'); ?></p>
    		<?php endif; // end loop ?>
    		<?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(); ?>

    Now I need to use a similar category template with the latest Genesis version and a HTML 5 child theme. Where do I get the code that is used to output a category archive? Or in other words what´s the best way to create custom category archive templates (I might need a few of them).

    Thanks
    Michael

    November 25, 2014 at 11:23 am #132768
    David Chu
    Participant

    Michael,
    Interesting question. I make loads of types of templates, but I haven't had the need for a category template yet. I may have handled that type of thing with hooks and filters. 🙂

    So you have plenty of Genesis code, but want the HTML5 version. Interesting!

    Apart from converting ID's to classes and manual stuff like that, I wonder if this might give you a nice tidy base for that.

    Dave


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

    November 26, 2014 at 5:00 am #132851
    michaeloeser
    Member

    Thanks David. I guess that already helps me.

    Cheers
    Michael

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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