Post the full code that is throwing the error, it’s probably just a PHP syntax problem.
Well i’m trying to add it into the header.php
at the moment i just put plan text so i knew i could see it then tried to hide if on phone.
========================================================
</div><!– .skip-container –>
<div id=”header”>
<?php responsive_header_top(); // before header content hook ?>
<?php if ( has_nav_menu( ‘top-menu’, ‘responsive’ ) ) {
wp_nav_menu( array(
‘container’ => ”,
‘fallback_cb’ => false,
‘menu_class’ => ‘top-menu’,
‘theme_location’ => ‘top-menu’
) );
} ?>
<?php responsive_in_header(); // header hook ?>
<?php if(is_desktop()) {};?>
<?php if ( get_header_image() != ” ) : ?>
Without posting the full code it’s hard to tell where the error is coming from. Maybe try putting the whole file on Pastebin?
Please find header pastebin:
http://pastebin.com/qLiHz13v (Available for 1 Week)
So if you delete the line with is_desktop you are saying the error goes away?
Can you post a link to the site?
<?php if(is_desktop()) {};?> < this is OK
put something in {} and then the error comes up.
well then it’s the thing you are pasting in… please post that
i’m just testing with egs:
{TEXT}
{echo “text”}
{echo text}
{echo text}
{print “text”}
just added a ; inside the {} and your never guess what.
None of that is valid PHP syntax. You can’t just paste anything – it need to be PHP code, correctly formatted.
i only want the last two items to be affected.
<?php wp_nav_menu( array(
'container' => 'div',
'container_class' => 'main-nav',
'fallback_cb' => 'responsive_fallback_menu',
'theme_location' => 'header-menu'
) ); ?>
try this
<?php if(is_desktop()) { echo "test"; };?>
Yeh this is what i did. I was missing out the rest as i’m only editing inside the {}. Sorry if that was not clear. basicly i was missing the ;
Please can you show me how to use on the code above.