Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
確かに単純なものですが、これを理解することはできません。
WordPress の標準メニューを使用する場合、区切り記号を挿入するにはどうすればよいですか
つまり、ホーム | 私たちについて | お問い合わせ
現時点で得られるのは、ホーム 私たちについて お問い合わせ だけです。の?
Cssトリックを使って提案します。
Css
.nav li + li:before{ content: " | "; padding: 0 10px; }
WordPress の方法:
<?php wp_nav_menu('menu=Top Menu&after=<span class="menu-divider">|</span>'); ?>
注:上記のスタイルのhtmlに従ってクラスを変更してください。