WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Custom post type and breadcrumbs (11 posts)

  1. Cultivate
    Member
    Posted 2 years ago #

    Ive setup a custom post type which contains a series of case studies as posts. These posts are displayed on a case studies page (which exists in wordpress)

    On this case studies page the breadcrumb outputs Home > Case Studies
    See here http://www.soil-engineering.co.uk/case-studies/

    On the single case study page view the breadcrumb loses the case-studies link and becomes Home > Case Study title.

    Is there a way to fix this?

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. kgreene9
    Member
    Posted 2 years ago #

    Hi,

    I am having a similar issue with case studies as posts being displayed on a page. When i click on a case study title, the path is:
    Home » Case Studies » Turbine Provides Savings and Education to South Elementary as seen here: http://talcoturbines.com/turbine-provides-savings-and-education-to-south-elementary/

    The problem is, when you click on "case studies" it takes you NOT to the page, but displays the posts as categories (and not the page). I added the code to the casestudiespage.php template.

    Any luck finding a solution?

  3. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    It's a setting under SEO -> Internal links...

  4. Cultivate
    Member
    Posted 2 years ago #

    Ive already played around with the settings and it isnt quite working how i need, so ive added this to my header

    <?php if ( is_singular( 'case-studies' ) ) { ?>
    <p id="breadcrumbs">You are here: <a href="http://www.soil-engineering.co.uk">Home</a> > <a href="http://www.soil-engineering.co.uk/case-studies/">Case Studies</a> > <strong><?php the_title(); ?></strong></p>
    <?php } else { ?>
    	 <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
    <?php }?>

    Which seems to do the trick.

  5. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Weird. You doing custom stuff?

  6. Cultivate
    Member
    Posted 2 years ago #

    Yes, custom post type using custom taxonomies to organise the posts.
    You can view the result here

    I needed the breadcrumb to be Home > Case studies > title, using the internal links setting i was getting Home > Custom Taxonomy > title.

    So im not saying the plugin is broken, just not working how i needed.

  7. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    but is the "case studies" page a proper custom post type archive defined by WP or a custom page template?

  8. Cultivate
    Member
    Posted 2 years ago #

    Im using a custom page template.

  9. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Then that's the issue, the plugin has no way of knowing that.... Your hack will work. In the future I'd advise using proper custom post type archives :)

  10. Bellu
    Member
    Posted 1 year ago #

    Hi i've the same issue.

    I've created a custom post type, and i've a single-custom_post_type.php and a archive-custom_post_type.php.

    The archive-custom_post_type.php is a custom template, so i have created a blank page with that template for display my custom_post_type posts.

    When i click to the permalink to the single post it works (wordpress load the single-custom_post_type.php) but in my breadcrumbs i've Home->Blog->custom_post_title, the correct structure is Home->custom_post_type->custom_post_title.

    How can i do?

    Thank you

  11. Cultivate
    Member
    Posted 1 year ago #

    I believe there is a check box within the internal links settings to remove blog page from breadcrumbs. Have you tried that?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic