On single custom post types using the single-course.php
template I want a different breadcrumb option to happen, but it's not obeying the &&
operator in the if statement:
<?php if ( function_exists('yoast_breadcrumb') && !is_page_template( 'single-course.php' ) ) {
yoast_breadcrumb('<p id="breadcrumbs">','</p>');
} else { ?>
<p id="breadcrumbs"><span xmlns:v="http://rdf.data-vocabulary.org/#"><span typeof="v:Breadcrumb"><a href="<?php echo site_url(); ?>" rel="v:url" property="v:title">Home</a> » <span rel="v:child" typeof="v:Breadcrumb"><a href="<?php echo site_url('/tracks'); ?>" rel="v:url" property="v:title">Tracks</a> » <strong class="breadcrumb_last"><?php echo get_the_title(); ?></strong></span></span></span></p>
<?php } ?>
This is a template piece that is called in the single-course.php
template (and others) after the loop:
<main class="main" role="main">
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('templates/page', 'header'); ?>
Thanks for any assistance.
is_page() && !is_page_template( 'single-course.php' )
?if ( function_exists('yoast_breadcrumb') && is_page() && !is_page_template( 'single-course.php' ) )