you can do that using custom css styling and by inspecting that html using chrome > Inspect Element to get the css class or id name.
the problem is that [categories_list] doesn’t gives class for the active link…
All list items of categories has not class
hmm… you’d probably need to create a custom placeholder for categories, and in that placeholder you’d check the current post, if it’s an event page then find the event categories and highlight appropriately.
here’s some starting points:
http://wp-events-plugin.com/tutorials/create-a-custom-placeholder-for-event-formatting/ (adjust for category hooks, just replace event(s) with category(ies))
if( em_is_event_page() ){
global $post;
$EM_Event = em_get_event($post);
$EM_Categories = $EM_Event->get_categories();
//etc.
}
But, what is the function that retrieves all categories?
My need is to have a list of all event categories where every of it has a different class.
I need to check if is an event page, events list page or category page. If true, I want to hight light the category link on sidebar.
The code that you given me retrieves me only the current category of the event, but i need to know the code to print the categorires list without using shortcode or placeholder.
This is what I think. If you have a better suggestion, please tell me.
Thanks Marcus.
But, what is the function that retrieves all categories?
EM_Categories::get();
It takes the same arguments as this – http://codex.ww.wp.xz.cn/Function_Reference/get_terms
The code I gave gets all the categories for the event you’re viewing, so you probably want to use a mix of the two to determine what categories are active.