WordPress.org

Support

Support » Themes and Templates » [Resolved] php help in K2 theme requested

[Resolved] php help in K2 theme requested

  • So I am having trouble with a blog I am helping with. It has two categories, news and training. each one is it’s own separate tab at the top of the screen. By clicking on the tab, you go to the archive page for the respective category. The tabs have the following code on them:

    <li class="<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Blog</a></li>

    I would like to know how to change this code so that one tab stays highlighted for category 1 and the other only for category 2.

    The page is http://bemoretraining.com/blog

    Thank you very much

Viewing 1 replies (of 1 total)
  • So, I fixed it.

    The code listed above now reads:
    <li class="<?php if ((is_home())or (is_category('1'))){ ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Blog</a></li>

    I have some very similar code to make the second tab work for it’s own category.

    So there is a cheap and easy hack for two blogs on one install. sorta

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] php help in K2 theme requested’ is closed to new replies.
Skip to toolbar