| User | Post |
|
8:55 pm 2 Apr 2008
| Brian C
Guest
| | | |
|
| |
|
|
I've installed the plug-in and assigned my pages to the “Case Studies” category. Here is the code I dropped into my sidebar:
<?php pcp_list_pages_by_category( 'Case Studies' , 'All' , false , true , '' , '' , false , '' ); ?>
This returns nothing except for the unordered list open and close tags.
However, if I remove 'Case Studies' and replace it with 'All' it displays all of my pages. So it seems like the pages aren't being assigned to the categories properly, or the template tag isn't calling them right.
I'm either missing something or there is an issue with this plug-in on Wordpress version 2.5.
Any thoughts?
|
|
|
|
|
Well, my sidebar (visible from all pages other than this forum) uses the plugin for my pages. The plugin lists are generated using it. I just also double checked and created a new page and it appeared in the category list just as it should.
Which means I tend towards the notion that you are missing something! But I'm not sure what. The formation of the function call is fine. The ONLY thng that leaves is the actual category record. It might sound like an insulting question, but are you 100% sure the actual category record reads 'Case Studies'? Remember it is case sensitive…?
There are two ways to check of the category is being assigned by the way. You can use the admin page that came with the plugin or - for a higher level of confort, edit one of the pages. The category should show as checked in the list.
|
|
|
10:59 pm 2 Apr 2008
| Brian C
Guest
| | | |
|
| |
|
|
Haha, yes I've spelled everything correctly and verified category assignment in the edit view and page category admin.
I did just notice that on the page category admin, next to the page title it says “(Orphaned from Parent)”. The case studies pages are assigned to a parent page, “Case Studies” and when I remove this setting, everything seems to work. Is there a way to make this work on sub-pages or am I stuck leaving them unassigned?
Thanks a lot for your help and amazingly speedy response.
|
|
|
11:06 pm 2 Apr 2008
| Brian C
Guest
| | | |
|
| |
|
|
Ok I see now that I have to have the parent page assigned to that category as well, then they both show up. However I just want the sub-pages, not the parent page.
Is this possible?
|
|
|
|
|
'Orphaned from parent' means the page is a sub-page with a parent entry but the parent no longer exists… - or at least, the ID of the parent in the sub-page record does not exist.
That makes a heirarchical display somewhat difficult.
Is it possible your sub-pages have become unlinked in some way?
PCP currently functions correctly for a single sub-page nesting but I have abug report in if the nesting is deeper than 1 (i.e., sub-sub-pages).
Does this help?
|
|
|
|
|
Brian C said:
Ok I see now that I have to have the parent page assigned to that category as well, then they both show up. However I just want the sub-pages, not the parent page.
Is this possible?
Yes - that's a better example. The page parent exists but is in a different 'category tree'. Also makes hierachical display a problem.
As to ONLY showing sub-pages… I think that is one option I haven't catered for.
|
|
|
1:12 am 3 Apr 2008
| Brian C
Guest
| | | |
|
| |
|
|
Ok that answers my question. Do you have any plans on assigning classes or ids to the list components in the future? This would make it easy to stylize or in my case hide/show specific elements using CSS.
Thanks a lot for all your help and letting me use your code!
|
|
|
|
|
It is somewhat remiss of me not to have done so isn't it? I'll try and find time today to do that. Anythugn special you'd like to see on the class front?
|
|
|
3:29 pm 3 Apr 2008
| Brian C
Guest
| | | |
|
| |
|
|
Well I'm not a PHP guy, but I did a little tinkering and I am now able to pass a class name to the ul tag from the template tag. Then I changed line 473 to include the page number as an id in the li tag - if($display_as_list) echo(”<li id=\”page_”.$page['ID'].”\”>”);
That's all I really needed personally. May be good for others too?
|
|
|
|
|
Sounds good. Are you willing to send the code file? if so I;ll send you an email address… Lazy I know bit it all helps!
|
|
|
4:44 pm 3 Apr 2008
| Brian C
Guest
| | | |
|
| |
|
|
No problem at all. I'm making a few other minor changes then I'll send you the final. Just shoot me an email at the address I gave the forum.
|
|
|
|
|
Thanks. Email on it's way.
|
|