[SOLVED] Category pages - page2cat or templates?
am struggling with category pages and the category page plugin. (page2cat)
I need several actual pages that display some static content followed by either posts or thumbnails and excerpts. Whichever I go with (posts vs. excerpts) will be global, IE the whole site will use that for post pages. These need to be actual pages, not category links, so they'll appear in drop down navigation. In non-Atahualpa sites, I've been able to copy the index as a named template, add static content below "get header", and replace the first loop section with this: Code:
<?php if(have_posts()) : ?> In Atahualpa I get a parse error, for something like line 329, way down. If I try the category page plugin, create a page, choose the category in the plugin control, I get nothing - just the static content from the WP "new page" editor - no category-based stuff (or anything else) below it. If I use the [catlist=xx] code, it works, but all I get is a list, screengrab below. So, the plugin doesn't seem to work the way the (very broken english) description suggests... there are posts here on the forum regarding hacks, but my understanding is that's written into 3.2 now. Can anyone point me to the functionality I need? Thanks a bunch! Screengrab -4 posts have this category, they show up as a list: http://landalerts.com/screen.gif |
Post the code that you put into the copied index.php including some lines above and below. You shouldn't get an error there
|
No luck with that - here's what I get:
Parse error: parse error, unexpected T_ELSE in /home/content/b/l/u/bluegreentexas/html/wp-content/themes/atahualpa332/wooded.php on line 335 Also tried it with page2cat disabled, same thing. Here's the code: Code:
<?php get_header(); ?> Code:
<?php Code:
<?php |
Bumping this thread back to (hopefully) life -anyone found a "static page with category posts that looks like your other posts page?"
This would be really cool for sites with tons of content, that need a page for each category in the menu structure. |
Post your whole wooded.php please
|
thanks Flynn - here's the file - too long to post on the forum. you can download it here:
http://mcarterphoto.com/332/ |
I've been using the plugin, List Category Posts
I didn't have complete success implementing Category 2 Pages, and also the fact that you can't have more than one category on a page. unless they are nested categories. What I like about this plugin is that you just create a page and where you want the categories, you just put in the short code. Here are some of the useages from the Readme.txt Quote:
|
Thanks Bill, but it looks like that Plugin just returns a list, same as page-2-cat; I need static pages that display categories the same way the blog displays posts - in my case thumbnail & excerpt.
This is doable by writing page templates, but with this theme I get parse errors and no page. Hope Flynn has some advice for me! Thanks for your help- MC |
You might want to check out:
http://dvector.com/oracle/ggis-inlinepost/. put post in page. It looks like you put in posts one at a time, not from a category, but you might be able to put PHP in a post that calls them up first, then use this plugin to display them. That would get you away from having to mess with template files, which can break with the next WP or Atahualpa update/upgrade. I haven't check it out myself though. |
Thanks - I took a look, but it involves adding a tag to every post - we're experimenting with using WP for a real estate site and using categories to search & sort, so they won't go for that.
What I want is really easy in other themes, and I don't mind the template issue. But creating category pages in this theme via templates just gives me parse errors - Flynn had posted that it would work, but he hasn't gotten back to this thread. I'd hate to drop this theme, I've got a ton of hours in this site (and some $$ in the donations box)! Atahualpa is pretty amazing for me, I'm more of a designer/useability guy than a coder, my personal blog came out great. |
Solved it - really simple, too, just add this:
Code:
<?php query_posts('cat=1&showposts='.get_option('posts_per_page')); ?> Took a lot of googling - all I found were other people wanting the same effect! |
All times are GMT -6. The time now is 01:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.