• I’m trying to create an archive index page for a specific category. I want to create two lists, monthly list for posts in one specific category and also a category list that includes all the other categories that posts in the speficic category belongs to.

    And why I want to do this? My blog is bilingual. Some posts are written in two languages, some posts just in one language. I have all the “normal” categories but I have also one category for both of languages. So just to be clear, each post belongs to category LANGUAGE1 and/or LANGUAGE2, plus at least one “normal” category like projects.

    This is an example how I would like to my separate archive index look like:


    Monthly archive for LANGUAGE 1:
    – August 2009
    – July 2009
    – June 2009

    Category archive for LANGUAGE1:
    – Life
    – Studying
    – Projects

    I’ve managed to solve the first part of my problem, I’ve found a plugin to create the monthly archive for one category. https://kwebble.com/blog/2007_08_15/archives_for_a_category. I’ve also found a way to hide categories LANGUAGE1 and LANGUAGE2 from the category listning. So now the problem is how to create a category list for a specific category?

Viewing 1 replies (of 1 total)
  • <?php $variable = wp_list_categories(‘echo=0&orderby=name&child_of=5&title_li’);
    $variable = str_replace(array(‘(‘,’)’), ”, $variable);
    echo $variable;
    ?>

    i use this to list the sub categories of category id 5

    hope this helps

Viewing 1 replies (of 1 total)
  • The topic ‘Archive index for a specific category’ is closed to new replies.