Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRogério Gouveia Fernandes
6,099 Pointsproblem with echo strip_tags [Coding the Header and Footer Templates lesson]
Hi, I simply can't run the site when using the echo ( 'echo' => false) [error 500]
<?php
$args = array(
'menu' => 'main-menu'
'echo' => false
);
echo strip_tags(wp_nav_menu( $args ), '<a>');
?>
thanks
2 Answers
Jacob Scanlon
8,994 PointsIt looks like you need a comma after the main-menu. So....
$args = array( 'menu' => 'main-menu', 'echo' => false );
Hope this helps.
Wayne Fonseca
7,796 PointsThank you, it works :)