WordPress.org

Support

Support » Themes and Templates » Why won't this work? if (!is_single() || (!is_page()))

Why won't this work? if (!is_single() || (!is_page()))

  • I am having a problem using the OR operator in php

    <?php if (!is_single() || (!is_page())) {
    				echo "<a href=\"";
    				the_permalink();
    				echo "\">";
    			}
    
    			the_title();
    
    			if (!is_single()) {
    				echo "</a>";
    			}
    		?>

    PHP simply ignores the statement…

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Why won't this work? if (!is_single() || (!is_page()))’ is closed to new replies.
Skip to toolbar