Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Need to call <li class= "current-cat-parent"> for single posts (http://forum.bytesforall.com/showthread.php?t=5484)

b1tzmast3r Jan 24, 2010 02:58 PM

Need to call <li class= "current-cat-parent"> for single posts
 
I'm trying to find out how I can define the "current-cat-parent" in the category menu on single post pages. My goal is so if visitors happen across a single post they'll know what category it falls under since I plan to highlight it in the menu.

I was able to do so on multipost pages for subcategories because I assigned a class to the current-cat-parent thanks to the fact that is was magically put there. Here's the sample:
Code:

<li class="cat-item cat-item-3 current-cat-parent">
If you click on a single post that "current-cat-parent" goes away. How can I put that back on single posts?

I dug all over the place but I couldn't figure out how to make that happen.


Here's my site info: WP 9.1 AP 3.4.4
Here's a subcategory where I got it to work
Here's a single post where I'm trying to get the category menu to highlight

Thanks in advance!!

Rob

juggledad Jan 24, 2010 04:10 PM

But a post can be in many categories, not just one, so when you are on a single post, there can be multiple possible category parents....

b1tzmast3r Jan 24, 2010 06:09 PM

I see what you mean. Since it's my portfolio I thought it was important to display which category they're in.

Does that mean it's not possible?

juggledad Jan 25, 2010 04:50 AM

Let me see if I understand. You have a category menu. If i was viewing the blog page and select a post (we will assume all posts on the blog page show as excerpts) and click it and go to the single post page, you want the menu item for each category it is in to be identified so you can highlight it. Right?

Do you know that, by default, all the categories a post is assigned to show up in the post footer and they are LINKS. Not only that, but you can specify it just be the first category or all categories and that you can use the 'Post Info Items' in the KICKER, BYLINE or FOOTER of a Post/Page?

Check out the options at ATO->Edit POST/PAGE INFO ITEMS

b1tzmast3r Jan 25, 2010 01:26 PM

Yes! You understand correctly.


I do totally appreciate you pointing out the other aspects simply because NOW I've modified it so not only does it create a "breadcrumb" in the kicker which indicates where they are, I've also set it up so I simply tag each project with the tools I used to create it and then set up the footer to display that information dynamicly!!! THAT'S AWESOME!!

Here's the results of those modifications which I think work quite well: http://portfolio.bitz-art.com/illust...s-go-goofy-go/

Even thought it would be cool...it's not quite as important now to highlight the category...but is it possible to exclude a category id from the %categories-linked(' | ')% codex?

I have it listed in the 'Feature' category only so it shows up in the slide show on the home page...I don't really want that category displayed in the so called breadcrumb.

Esentially it would be perfect if it could say "BITMAP | ILLUSTRATION" w/o Feature.

Is that a possibility?

Thanks soooo much!! I will be making a donation for your efforts!! Still trying to figure out how to fund some groceries first :o

juggledad Jan 25, 2010 02:48 PM

You couldn't do it for a single post - ie have Disney's "Go Goofy Go" - not display FEATURE, but have 'Toby The Tile' display FEATURE and you would have to modify the code to do it. The code in question is in bfa_postinfo.php around line 329. You would need to test for teh category you don't want to show up and skip that one.


All times are GMT -6. The time now is 05:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.