286 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+3 more
AkinGn says

Hi,

I needed to link to contact page within the content of the homepage, and it has to be in a flexible way (I’m not talking about giving the link just like <a href="&lt;?php bloginfo('url'); ?&gt;/page_id=123" />) I googled for the problem, and I noticed there is a solution with the tag wp_get_nav_menu_item(), but I couldn’t find any documentation for it. Then I solved it via including the footer menu there via &lt;?php wp_nav_menu( array('menu' ?&gt; 'Footer Nav' )); ?&gt; and hiding all menu items except “contact” via css (.menu li a{display:none;} and .menu li:last-child a{display:block etc}) I could do that because the “contact” was the last item of that menu. I wonder does anyone know a better solution or have some info about wp_get_nav_menu_item()?

by
by
by
by
by
by