I want parts/lesson-links.php
not to be included when get_the_lesson_contenttype()
equals to "Hint" or "Main Lesson".
So I did this:
<h2><?php echo get_the_lesson_contenttype(); ?></h2>
<?php if (get_the_lesson_contenttype() != 'Hints' || get_the_lesson_contenttype() != 'Main Lesson') { ?>
<?php
include( locate_template( 'parts/lesson-links.php' ) );
?>
<?php } ?>
But as you can see in this page: http://clo2015.chineselearnonline.com/lessoncontent/lesson-004-hints-and-tips/
parts/lesson-links.php
is still being added. What did I do wrong?
EDIT:
Strangely it works without the ||
, only adding Hint
:
<?php if (get_the_lesson_contenttype() != 'Hints') include( locate_template( 'parts/lesson-links.php' ) );?>