• I have a custom post type which I want to add into my breadcrumbs.
    This is the current statement:

    <?php if (is_home()) { ?>
    	<p class="breadcrumb"><a href="http://www.mysite.com/">Home</a> &raquo; Blog</p>
    <?php } elseif (is_home() || is_single()) { ?>
    	<p class="breadcrumb"><a href="http://www.mysite.com/">Home</a> &raquo; <a href="http://www.mysite.com/blog/">Blog</a> <?php wp_title(); ?></p>
    <?php } elseif (is_category()) { ?>
    	<p class="breadcrumb"><a href="http://www.mysite.com/">Home</a> &raquo; <a href="http://www.mysite.com/blog">Blog</a> &raquo; Category &raquo; <span class="browsing">'<?php single_cat_title(); ?>'</span></p>
    <?php } elseif (is_month()) { ?>
    	<p class="breadcrumb"><a href="http://www.mysite.com/">Home</a> &raquo; <a href="http://www.mysite.com/blog">Blog</a> &raquo; Archives &raquo; <span class="browsing">'<?php the_time('F, Y'); ?>'</span></p>
    <?php } elseif (is_tag()) { ?>
    	<p class="breadcrumb"><a href="http://www.mysite.com/">Home</a> &raquo; <a href="http://www.mysite.com/blog">Blog</a> &raquo; Browsing by <span class="browsing">'<?php single_tag_title(); ?>'</span> tag</p>
    <?php } elseif (is_page(array('web-design', 'print-design', 'graphic-design', 'media-design'))) { ?>
    	<p class="breadcrumb"><a href="http://www.mysite.com/">Home</a> &raquo; <a href="http://www.mysite.com/portfolio/web-design">Portfolio</a> <?php wp_title(); ?></p>
    <?php } else { ?>
    	<p class="breadcrumb"><a href="http://www.mysite.com/">Home</a> <?php wp_title(); ?></p>
    
    <?php } ?>
    <div class="clear"></div>

Viewing 1 replies (of 1 total)
  • Thread Starter Dave Meier

    (@hiddendepth)

    I need to add in an ‘elseif’ statement to change the breadcrumb menu if you are on a custom post type page.

Viewing 1 replies (of 1 total)

The topic ‘Custom Post Type Breadcrumb if statement’ is closed to new replies.