Parse error on Sliding Door
-
I’ve been trying to get the sliding door technique on WP 3.4.
After some research, I found that I can accomplish this by adding to the wp_nav_menu function. My code looks like this:
<?php wp_nav_menu( array( ‘link_before’ => ‘<span>’, ‘link_after’ => ‘</span>’, 'sort_column' => 'menu_order', 'menu_class' => 'nav', 'container_id' => 'header', 'theme_location' => 'primary-menu' ) ); ?>When I try to load my site, i get the following error:
Parse error: syntax error, unexpected ‘>’ in …/wp-content/themes/test theme/header.php on line 30
I already have my nav menu set up, but I wanted to add customized background images to it through CSS…
Could someone please point me in the right direction?
-
Parse error: syntax error, unexpected $end in /home/aranea/public_html/bettingtradition.com/wp-content/themes/sliding-door/functions.php on line 460
same problem. after trying to define a header image
Open up your header.php file and go to line 30 and look for the nearest opening and closing
<?php'?>` tags and make sure they are closed before an html section and open for a php section.Usually this happens something like this:
<?php some_function( $foo = $foo ) { echo $foo } <div id="bar">There should be a
?>closing php tag after the left curly bracket that will throw the same error your reporting.Pastebin
There’s a link to my header.phpLine 30 is the wp_nav_menu function. I’m not exactly sure what you mean by that.
Should I put the ?> tag right before the ‘<span>’ tags and reopen <?php right after them?
I have very little experience with php, so I’m not that great with the syntax yet…
I figured it out. Putting double quotes around the <span> tags seemed to do the trick.
The topic ‘Parse error on Sliding Door’ is closed to new replies.