Check this tutorial for dynamic menu.
hi and thanks for your reply.
My actual problem is not the highlighting of the menu but how to make the term _e(“mycat”) translatable(localization).
I would like to have the category term e.g. about translated depending on the language <?php if (is_page(‘about’) ) so in German it looks for the catgory name ‘ueber’ by using the _e() function.
I’m not sure what I’m missing syntax error this does not work.
in_category(‘_e(“mycat”)’)
Thanks
I found the solution.
You cannot use the e() function you need to use the __() function to return the string.
<li<?php
if (is_single() && in_category(__('about', 'themeName')) || is_child(123)) {
{ echo ' class="current"'; }?>
<?php } ?>>
<a id="nav1" href="<?php bloginfo('url'); ?>/<?php _e('about','themeName'); ?>" title="<?php _e('About','themeName'); ?>"><?php _e('About','themeName'); ?></a></li>