[wp-hackers] Custom Page Template - can't see the forest through the trees

Mike Walsh mpwalsh8 at gmail.com
Fri Apr 2 17:27:41 UTC 2010


On Fri, Apr 2, 2010 at 12:58 PM, Otto <otto at ottodestruct.com> wrote:

> [ ... snipped ... ]
> So, what you want isn't really to put a category of posts onto a Page,
> but to put a category of posts into that navigation bar/tabs thing
> that you have.
>

Sort of.  I want a page that contains the posts from a particular category
which is not the same as a navigational tab that is essentially just a link
to a particular category.  This slight difference matters because the
display of the content going through the category hierarchy is excerpts
where what I want is the full post just like they appear on the front page
of the site.


>
> Like 90% of the time when I see themes that have lists of pages across
> the top, they are using code like this, probably in the header.php:
>
> <ul class="navbar">
> <?php wp_list_pages(...); ?>
> </ul>
>
> Then the CSS for "navbar" makes it display that stuff in the row.
> Well, modifying that to put categories in there too is trivial:
>
> <ul class="navbar">
> <?php wp_list_pages(...); ?>
> <?php wp_list_categories(...); ?>
> </ul>
>
> See? Simple. Now the categories show up in that bar too. If you only
> want category 23 to appear in that bar, then that's easy:
> wp_list_categories('include=23');
>
> It's always easier to do things the right way, and that means really
> defining what you want to do, not how you want to do it.
>
>

I hadn't thought of using the category as part of the header, that is worth
exploring so I looked at the theme header and it is constructed almost as
you suspected it would be.  While I could do what you suggest above it won't
account for page ordering and I still have the problem I noted above
regarding excerpts.

I want to find or develop a different theme for this site but I that isn't a
project for this afternoon.  I have John Boch's suggestion working now and
my wife is happy (which is all that really matters) so now I have to return
to my real job!

Thanks for the help.  I love this list, lots of smart people here.

Mike


More information about the wp-hackers mailing list