• Hello,

    I’m looking to place an if statement at the in my headed page that if dosent display the menu on the ‘activities’ template page, this is what I’ve got so far, I think im getting the syntax for the embedded html wrong”

    <?php if (is_php_template($activity)) {
    		}
    	else {
    		<div class="main-nav">	
    
    		<nav id="access" role="navigation">
    
    		wp_nav_menu(array('menu'=> get_post_meta($post->ID, 'menu_name', true) ));
    
    		</nav>
    		</div>
    	}
    	?>

    Thank you,

Viewing 2 replies - 1 through 2 (of 2 total)
  • close the php tags before switching to html, and vice-versa.

    example:

    <?php if (is_php_template($activity)) {
    		}
    	else { ?>
    		<div class="main-nav">	
    
    		<nav id="access" role="navigation">
    
    		<?php wp_nav_menu(array('menu'=> get_post_meta($post->ID, 'menu_name', true) )); ?>
    
    		</nav>
    		</div>
    <?php	}
    	?>
    Thread Starter liondedan

    (@liondedan)

    Why don’t I have any logic?

    Thanks again ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘If statement template’ is closed to new replies.