• 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

Looking to rewrite category loop

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 › Looking to rewrite category loop

This topic is: not resolved

Tagged: template category

  • This topic has 4 replies, 4 voices, and was last updated 9 years, 9 months ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 15, 2013 at 9:42 am #41024
    Joe Siegler
    Participant

    I'm looking to rewrite the category loop for specific categories.  I've used other themes by folks who don't have a framework like genesis, and for them I would take the archive.php file, and rename it to category-xx.php, and then rewrite as needed.   So my first thought there was to do the same thing.  Except that the nuts and bolts are in the genesis theme, not the them I'm using (Amped).  So I looked there, and dug out the file, and it's not as easy as that - or at least it isn't to me.

    Here's what I'm looking to do.  I run a fan website for the band Black Sabbath, and I want to assign concerts as posts, and group them by tour archive.  I had this done previously in an old iteration of my website, but that was Movable Type, and I need to get all this into WordPress.    What I'm hoping to do is work out the category page layout, and then import the data I still have hanging around from Movable Type, but I need to work out the format before I start getting the data in there.    I have a few examples here:

    http://www.black-sabbath.com/category/tour-stuff/2013tour/

    I really want to rewrite the loop to the point where it's unrecognizable almost.  See this page for an example of what I'm talking about.  Rework it into a list like this:

    http://www.black-sabbath.com/tourdates/2008tour/

    (For the record, this older 2008 tour is a page in WordPress, where I inline in a specially formated page from Movable Type showing the actual tour dates in a list).

    I have no problem doing the grunt work to make it output like that, but I'm having problems figuring out how the heck to get the process started in Genesis, as it seems a bit more complicated than my past experiences with template modification.

    Random notes related to this.  Mostly notes for myself for future reference.

    1) The 2013 tour is "Category 39".
    2) I'll also want to override the default setting of 10 posts per archive page to "show all".  I assume that can be done in here.
    3) Also will want the resultant category page to NOT show any kind of featured image

    Anyone have any idea on how i can get started with the category-xx.php concept here?  Tkx.

    http://www.black-sabbath.com/category/tour-stuff/2013tour/
    August 20, 2013 at 2:08 pm #57664
    Susan
    Moderator

    Hi, I’m working through the posts which remain unresolved. As you posted this a while ago, I hope your issue has been resolved. If not, please check in, and I will escalate this for you.

    August 20, 2013 at 4:37 pm #57786
    Joe Siegler
    Participant

    No, nothing ever happened with that. I ended up giving up on the idea and going to a basic list. The original request I suppose is still there, but I don't know if I have the time to do a lot of muddling about with code at this point. The thing I wanted to use this for has already started, and I suppose I can retroactively put it in there, I was hoping to work this out earlier.

    August 20, 2013 at 8:35 pm #57830
    itsonlybarney
    Member

    Try the following code in your category-xx.php file:

    category-xx.php

    I'm hoping the code:

    remove_action( 'genesis_post_content', 'genesis_do_post_image' );

    will remove the featured image, but I haven't tested it.

    August 21, 2013 at 11:22 am #57964
    Brad Dalton
    Participant

    So will this code which in tested:

    You can easily change the category i.d in the code above to your own.

    If you're using a template file for a specific category, placing this code in the template file is another solution which also works:

    remove_action( 'genesis_post_content', 'genesis_do_post_image' );
    

    Tutorials for StudioPress Themes & WooCommerce.

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

© 2023 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