WordPress.org

Ready to get started?Download WordPress

Forums

Subcategories, pages & hihlighting (4 posts)

  1. n37
    Member
    Posted 6 years ago #

    Hi, i'm using WP as a CMS but having some troubles.

    First of all, my page navigation:

    wp_list_pages('sort_column=menu_order&depth=1&title_li=&exclude=37');

    I've got a page called articles. In page.php i've got some code to get in that page only the articles category posts:

    if( is_page('articles') ) query_posts('category_name=articles');

    In the sidebar.php i've got some code too, to show only the articles (ID=1) subcategories:

    $this_cat = get_category($cat);
    if( is_page('articulos') || is_category('articulos') || $this_cat->category_parent == 1 ) :
    <ul>
    wp_list_categories('title_li=&orderby=ID&show_count=0&use_desc_for_title=0&hide_empty=0&child_of=1');
    </ul>
    endif;

    Th problem starts now, when i go to the page articles and then to some subcategory. The page li loses his .current_page_item and even if go to a post from there, the .current-cat dissappears too...

    Any solution? TIA.

  2. n37
    Member
    Posted 6 years ago #

    No one can provide some help on that? ;/

  3. kaiiser
    Member
    Posted 6 years ago #

    i´m now searching for a long time ... there´s no help at subcategories. ever tried to just call the title of a subcategory ? ... i just can´t find anything...

  4. n37
    Member
    Posted 6 years ago #

    We can try to hack the 'wp_list_categories' function, but that's not so much elegant indeed... :x

Topic Closed

This topic has been closed to new replies.

About this Topic