ドロップダウンメニューの編集PHP

newnew:

私はそれが実際のメニューにバーから直進するので、私のドロップダウンメニューを編集したいと思います。

$item_output = $args->before;

    /*
     * Glyphicons
     * ===========
     * Since the the menu item is NOT a Divider or Header we check the see
     * if there is a value in the attr_title property. If the attr_title
     * property is NOT null we apply it as the class name for the glyphicon.
     */
    if ( ! empty( $item->attr_title ) ) {
        $item_output .= '<a' . $attributes . '><span class="glyphicon ' . esc_attr( $item->attr_title ) . '"></span>&nbsp;';
    } else {
        $item_output .= '<a' . $attributes . '>';
    }

    $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
    $item_output .= ( $args->has_children ) ? ' </a><span class="dropdown-toggle shapely-dropdown" data-toggle="dropdown"><i class="fa fa-angle-down" aria-hidden="true"></i></span>' : '</a>';
    $item_output .= $args->after;

    $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}// End if().
}

HTML

                    <i class="fa fa-bars"></i>
                </div>

                <div class="module-group right">    
                    <div class="module left">


                        <div class="collapse navbar-collapse navbar-ex1-collapse"><ul id="menu" class="menu"><li id="menu-item-3530" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-3530 dropdown"><a title="Contact" href="https://4309.co.uk/contact/">Contact </a><span class="dropdown-toggle shapely-dropdown" data-toggle="dropdown"><i class="fa fa-angle-down" aria-hidden="true"></i></span>

CSSを使用することができれば、素晴らしいが、私は、PHPの思ったんだけどは、唯一の解決策ではないかもしれません。

ここに

Vasilis G .:

あなたは、要素を削除することができます。

<span class="dropdown-toggle shapely-dropdown" data-toggle="dropdown"><i class="fa fa-angle-down" aria-hidden="true"></i></span>

その後、あなたが行くとにCSSルールを追加することができます.dropdown-menuのためのクラスul

display: block !important;

ここでは、画像の説明を入力します。

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=33948&siteId=1