Adding breadcrumb funtion to custom post

I’d like to add the breadcrumb function to a custom post type I made. I’ve been trying to use this:

<?php x_get_option( 'x_breadcrumb_display' ); ?>

to call it, but it’s not working. Is this not correct?

here’s the full code (after the fullwidth call:

<?php get_header(); ?>
  
  <div style="margin:20px auto;!important" class="x-container max width offset">
    <div class="<?php x_main_content_class(); ?>" role="main"> 

      <?php while ( have_posts() ) : the_post(); ?>
        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  			<div class="entry-featured">
  			</div>
  			<div class="entry-wrap">
<div style="margin:0 0 12px 0;">
   <?php x_get_option( 'x_breadcrumb_display' ); ?>
</div>
    			<?php x_get_view( 'integrity', '_content', 'post-header' ); ?>
    			<?php x_get_view( 'global', '_content' ); ?>
  			</div>
  			<?php x_get_view( 'integrity', '_content', 'post-footer' ); ?>
			</article>
        <?php x_get_view( 'global', '_comments-template' ); ?>
      <?php endwhile; ?>
    </div>

    <?php?>
      <?php get_sidebar(); ?>
    <?php?>

  </div>

<?php get_footer(); ?>

Hi there,

Thanks for writing in.

That’s not correct, it only pulls the flag if the breadcrumb is displayable or not. It should be <?php x_breadcrumbs(); ?>.

Thanks!

Thanks. Hmm…would it not be showing in a post because there’s no hierarchy? in other words, I’m using The Grid to display specific post entries on a sub-page. But because that post isn’t part of a WP page hierarchy, it won’t show the breadcrumbs?

Hey There,

The breadcrumb will display on a page, posts or a custom post type. I am not just sure enough how the page is laid out. You have a page that displays a grid? The breadcrumb will display the page and the home link. Clicking on each item in the grid will bring you to the individual item post. The breadcrumb may still display with the posts. Could you please send us an example url of your custom post item?

Thanks.

http://progressive.thebrandcounselors.com/ottobock-s380-sport-prosthesis/

Hey There,

This is just a normal post. I have checked the page and I can see that you are using custom header. You will need to edit your header, add a new bar and insert the breadcrumb element into this new bar. You should be able to display the breadcrumb anywhere in your custom header.

Hope this make sense.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.