خرید بک لینک

Vote count: 0

i build my WordPress Menu with an Extendend Walker Menu. I need around the FIRST-Level of the Submenus a DIV Wrapped. This is allready working. Here my Code:

class SH_Child_Only_Walker extends Walker_Nav_Menu {

     function start_lvl( &$output, $depth = 0, $args = array() ) {
        $indent = str_repeat("t", $depth);
        $output .= "n$indent<div class="submenu"><ul class="sub-menu">n";
    }

     function end_lvl( &$output, $depth = 0, $args = array() ) {
        $indent = str_repeat("t", $depth);
        $output .= "$indent</ul>n<span class="subtoggle"></span></div>n";
    }

But here i get this DIV wrappped around every Sub-Menu, also in deeper Levels.

I need it just this way:

First Level: Main Menu

Second Level: Sub-Menu (with DIV)

Third Level: Sub-Menu (without DIV)

How can i achive this with the Extended Walker Menu. I dont want to use jQuery or any JavaScript.

Thanks

asked 21 secs ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 24 تير 1395 ساعت: 14:12

صفحه بندی