Community Forums › Forums › Archived Forums › Design Tips and Tricks › Looking to rewrite category loop
Tagged: template category
- This topic has 4 replies, 4 voices, and was last updated 11 years, 5 months ago by Brad Dalton.
-
AuthorPosts
-
May 15, 2013 at 9:42 am #41024Joe SieglerParticipant
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 imageAnyone 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 #57664SusanModeratorHi, 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 #57786Joe SieglerParticipantNo, 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 #57830itsonlybarneyMemberTry the following code in your category-xx.php file:
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 #57964Brad DaltonParticipantSo 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' );
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.