Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Gabor

    (@nextendweb_gabor)

    Hi Boris!

    I’m sorry, but we only have the option to open up the menuitem, where you are, and not the category of that post. But I will put this option into the to do list, because it sounds like a good thing, what others could use too.

    Is there an update for this, since this is posted 6 months ago ??

    Im testing accordion menus and cant find this option.

    Thx

    Plugin Author Nextendweb

    (@nextendweb)

    Could you do a quick test for me?

    Open
    wp-content\plugins\nextend-accordion-menu\types\wordpress\wordpress\menu.php

    Find the following:

    function find_active( $sorted_menu_items ){
    ....
    
    ....
        return $sorted_menu_items;
    }

    and replace it with this one:

    function find_active( $sorted_menu_items ){
            $closestActive = null;
            foreach ( $sorted_menu_items as $menu_item ) {
                if ($menu_item->current) {
                    $closestActive = $menu_item;
                    break;
                }else if ($menu_item->current_item_parent ) {
                    $closestActive = $menu_item;
                }else if (!$closestActive && $menu_item->current_item_ancestor ){
                    $closestActive = $menu_item;
                }
            }
            if($closestActive){
                $active = new stdClass();
                $active->id = $closestActive->ID;
                $active->parent = $closestActive->menu_item_parent;
                $this->active = $active;
            }
            return $sorted_menu_items;
        }

    Could you tell me if the result is good in your case?

    Hey man, this works =)
    Thx for fast help!

    Plugin Author Nextendweb

    (@nextendweb)

    Thank you for your confirmation! I will create an update tomorrow.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Keep categories expanded on single post’ is closed to new replies.