WordPress.org

Ready to get started?Download WordPress

Forums

Custom post types & breadcrumbs (8 posts)

  1. Ashley Shaw
    Member
    Posted 3 years ago #

    Hi All...

    Hot some issues with custom post types & breadcrumbs.

    Implemented a directory on a website and when clicking on the directory link in the nav the breadcrumbs shows the following:

    You are here: Home » Blog » first directory entry title

    It should read:

    Home » Directory

    We also got sub categories within our directory and when clicking on that sub category the breadcrumbs changes to:

    You are here: Home » Blog » first directory entry title

    It should read:

    You are here: Home » sub category

    And when clicking to view an entry then it it should read:

    You are here: Home » sub category » entry

    We are using the yoast_breadcrumbs plugin. Any information would be very helpful..

    Thanks.

  2. Brig01
    Member
    Posted 3 years ago #

    I'm having the same issue with the Yoast breadcrumbs plugin.

    I got a custom post type called products.
    I've set the slug of this post type to products.

    At the moment the breadcrumb on product pages show up as:

    Home > Blog > Product page title

    I want it to say:

    Home > Products > Product page title

    Anyone got any ideas how to fix this?

  3. gotfers
    Member
    Posted 3 years ago #

    In your breadcrumb function, use the code next :

    $category = get_post_type_object(get_post_type())->label;

  4. fxfuture
    Member
    Posted 3 years ago #

    I'm trying to do this too. Whereabouts do you put that code?

  5. akyusa01
    Member
    Posted 3 years ago #

    I believe Yoast is working on the fix, but for now - did anyone ever find out where to place that above code? I've been searching & trying different things for days upon days & I'm about ready to just rip out the call for that page! HELP !! :)

  6. fxfuture
    Member
    Posted 3 years ago #

    Use the development version of Breadcrumb NavXT - it works perfectly with custom post types.

  7. dspilka
    Member
    Posted 3 years ago #

    Anyone ever get Yoast to work with custom post types?

  8. staxxx
    Member
    Posted 3 years ago #

    @gotfers Great answer. Do you have any directions on where to put that line of code?
    I'm using WordPress SEO (by Yoast) version: 0.2.3.2 in which the breadcruns are not working in combination with custom post types. The name (category) of the custom post type is not shown.

Topic Closed

This topic has been closed to new replies.

About this Topic