• Hi!

    Im using the latest 5.0.1 version of navXT and have this strange problem with translated breadcrumbs(with WPML) and custom post types.

    The site has 2 languages – one native + english.

    When navigating on the english site, the translated trail works until the custom post type page is opened:

    first level page > second level > third(custom type)

    When I’m on the second level, the crumb is correct and displays the two levels correctly in english. When I go to a subpage, the trail loses translation and displays as follows:

    first level(native) > sec(native) > sub(english)

    I’ve searched around a lot, but haven’t figured it out.
    Is there something specific setting that the custom post has to have ?
    First and second levels are pages, the third is a post.

    Any pointers/ideas ?
    Thanks in advance!

    https://wordpress.org/plugins/breadcrumb-navxt/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Havlik

    (@mtekk)

    Does this happen all the time (for all posts of that post type), or does it only affect certain posts?

    I don’t exactly remember how WPML was handling the two different language versions for pages, but if they were two different posts (as in an instance of a post type, be it custom or built in), I could see how this happens. Breadcrumb NavXT uses the get_the_title() function for retrieving a post’s (instance of a post type) title. For parent posts, it passes in the parent post ID, which may not correspond to the version you want for the current language.

    Alternately, if the first level and second level are pages (the post type), and second level is set as the root page for the custom post type in the Breadcrumb NavXT settings, I could see how there may be an issue. You may have set the root page to the native language version of “second level”, that ID never gets translated to the English version of “second level” as there isn’t really a way to do that. I will need to look into this one (will likely require a new filter in Breadcrumb NavXT to facilitate the desired behavior).

    I am tracking this issue here: https://github.com/mtekk/Breadcrumb-NavXT/issues/67

    Thread Starter udc_dezine

    (@udc_dezine)

    Sorry for delayed answer but yes, this behaviour happens for all those pages of that type.
    Is there any (somewhat) easy way of a “dirty-hack” solution to make it work until you develop something nicer?

    Plugin Author John Havlik

    (@mtekk)

    Unfortunately, from what I can tell, there isn’t an easy hack to fix this. If I have time this weekend, I will try to look into it (I have it slated as something to fix, or lay the groundwork for a fix in the next version of Breadcrumb NavXT, which I want to release before WordCamp Minneapolis in 2 weeks).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘translated breadcrumbs broken on custom post page’ is closed to new replies.