{"id":85002,"date":"2019-01-17T16:13:12","date_gmt":"2019-01-17T16:13:12","guid":{"rendered":"https:\/\/es.wordpress.org\/support\/topic\/menu-solo-funciona-en-pagina-de-inicio\/"},"modified":"2019-01-17T16:13:12","modified_gmt":"2019-01-17T16:13:12","slug":"menu-solo-funciona-en-pagina-de-inicio","status":"publish","type":"topic","link":"https:\/\/es.wordpress.org\/support\/topic\/menu-solo-funciona-en-pagina-de-inicio\/","title":{"rendered":"Menu solo funciona en p\u00e1gina de inicio"},"content":{"rendered":"<p>Hola a todos!.. Soy algo nuevo en el foro.<\/p>\n<p>Como dice el titulo del debate, tengo un peque\u00f1o y extra\u00f1o problema con el men\u00fa del sitio que estoy desarrollando. Ya hace un tiempo que vengo desarrollando sitios con WordPress y nunca me hab\u00eda pasado esto. Cuando registro el menu en functions.php y lo llamo en mi header.php este menu solo me funciona en la pagina de inicio. Me aparece en todas las paginas del sitio, pero solo me funciona en el inicio.<\/p>\n<pre><code>function ayala_menus() {\n    register_nav_menu( &#039;header-menu&#039;, _( &#039;Header Menu&#039;, &#039;ayala&#039; ) );\n}\nadd_action( &#039;init&#039;, &#039;ayala_menus&#039; );<\/code><\/pre>\n<p>Ese es el c\u00f3digo que tengo en mi \u00abfunctions.php\u00bb<\/p>\n<pre><code>&lt;?php\nwp_nav_menu(\n    array(\n        &#039;theme_location&#039;        =&gt; &#039;header-menu&#039;,\n        &#039;container&#039;             =&gt; false,\n        &#039;fallback_cb&#039;           =&gt; false,\n        &#039;link_before&#039;           =&gt; &#039;&lt;i class=&quot;fa fa-user fa-fw&quot;&gt;&lt;\/i&gt;&#039;\n    )\n);\n?&gt;<\/code><\/pre>\n<p>Y ese es el c\u00f3digo en mi \u00abheader.php\u00bb..<\/p>\n<p>Como les comento, nunca hab\u00eda tenido problema con ello.<\/p>\n<p>Desde ya, muchas gracias!!<\/p>\n","protected":false},"template":"","class_list":["post-85002","topic","type-topic","status-publish","hentry","topic-tag-menu"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/85002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/85002\/revisions"}],"wp:attachment":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=85002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}