Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress create menu
    primarykey
    data
    text
    <p>i created a new menu and it shows perfectly , but the problem is with select , it sends me to pages or posts that do not exist , the problem , i suppose , ..... change the format output and i don´t know how i can fix that.</p> <p>My Code :</p> <pre><code>&lt;?php wp_create_nav_menu( 'Mobil Menu', array( 'slug' =&gt; 'theme_footer_mobil_menu' ) ); class Walker_Nav_Menu_Dropdown extends Walker_Nav_Menu { // don't output children opening tag (`&lt;ul&gt;`) public function start_lvl(&amp;$output, $depth){} // don't output children closing tag public function end_lvl(&amp;$output, $depth){} public function start_el(&amp;$output, $item, $depth, $args){ // add spacing to the title based on the current depth $item-&gt;title = str_repeat("&amp;nbsp;", $depth * 4) . $item-&gt;title; // call the prototype and replace the &lt;li&gt; tag // from the generated markup... parent::start_el(&amp;$output, $item, $depth, $args); $output = str_replace('&lt;li', '&lt;option', $output); } // replace closing &lt;/li&gt; with the closing option tag public function end_el(&amp;$output, $item, $depth){ $output .= "&lt;/option&gt;\n"; } } wp_nav_menu(array( "menu"=&gt;"Mobil Menu", 'theme_location' =&gt; 'primary', 'walker' =&gt; new Walker_Nav_Menu_Dropdown(), 'items_wrap' =&gt; '&lt;select class="footer_menu_mobile" onChange="if(this.selectedIndex!=0) self.location=this.options[this.selectedIndex].value"&gt;%3$s&lt;/select&gt;', )); ?&gt; </code></pre> <p>Show perfect the menu drop down , but the real problem is with the URL launch from selected menu , this URL show with blank spaces and no right</p> <p>Thank´s regards !</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload