My b2evolution Version: 1.9.x
HI,
I know nothing about pHP, so I hope someone in here can help me. I want to show my categories for each post as a list, so that each category will be surrounded by <li></li>.
Just like it is shown in the sidebar with the use of
$Plugins->call_by_code( 'evo_Cats', array( // Add parameters below:
) );
I just want to only show the categories that are associated woth that particular post.
the code I have tried to modify is
<?php $Item->categories(); ?>
Right now my categories are shown like: category, another category, the third category.
I want them to show like:
<li>category</li>
<li>another category</li>
<li>the third category</li>
:: Kasper
What it's doing is putting your main category instead of numerical order so that you can get your <ul> in there where it belongs. It also hides all the other categories. Second time you call the categories function it'll hide the main cat and wrap all other cats in <li></li> like you want. Finally you echo out a </ul> to close the unordered list.
Looks good on paper. Reckon you'll let us know if it works in the real world or not?