Looking to rewrite category loop

Community Forums Forums Design Tips and Tricks Looking to rewrite category loop

This topic is: not resolved

This topic contains 4 replies, has 4 voices, and was last updated by  braddalton 11 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #41024

    Joe Siegler
    Participant
    Post count: 4

    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.

    • This topic was modified 1 year, 2 months ago by  Joe Siegler. Reason: Thought of addtl data
    • This topic was modified 1 year, 2 months ago by  Joe Siegler. Reason: Thought of addtl data
    http://www.black-sabbath.com/category/tour-stuff/2013tour/
    #57664

    Susan
    Moderator
    Post count: 7991

    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.


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #57786

    Joe Siegler
    Participant
    Post count: 4

    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.

    #57830

    itsonlybarney
    Participant
    Post count: 15

    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.

    • This reply was modified 11 months, 1 week ago by  itsonlybarney.
    • This reply was modified 11 months, 1 week ago by  itsonlybarney.
    #57964

    braddalton
    Participant
    Post count: 8875

    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:
    [php]
    remove_action( ‘genesis_post_content’, ‘genesis_do_post_image’ );
    [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.