Skip to content

Instantly share code, notes, and snippets.

@Dianakc
Created March 15, 2014 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dianakc/133394079f4bc48aaaac to your computer and use it in GitHub Desktop.
Save Dianakc/133394079f4bc48aaaac to your computer and use it in GitHub Desktop.
Obtém os itens do menu de um theme location. Ex: pega os itens que estão no menu Rodapé, não os itens de menu baseando-se no menu que tiver criado.
<?php
$menuParameters = array(
'theme_location' => 'menu_d', // o nome do local! De quando se cria locais!
'container' => false,
'echo' => false,
'items_wrap' => '%3$s',
'depth' => 0,
);
echo strip_tags(wp_nav_menu( $menuParameters ), '<a><li>' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment