Minor change to nirvana_breadcrumbs function for translation

  • Author
    Posts
  • #30583
    JJ

    I am using Nirvana with the translation plugin, qTranslate-X. Everything works beautifully for the most part, but there is a minor issue with attachment pages when they have a parent: the parent title in the breadcrumb area is not translated properly. Instead, all language versions of the title appear side-by-side.

    I investigated the nirvana_breadcrumbs function in theme-functions.php. On line 253, within the elseif ( is_attachment() ) conditional, the parent page’s title is retrieved using $parent->post_title, while other titles are retrieved using the get_the_title() function.

    I created a replacement function in my child theme that changes $parent->post_title to get_the_title($parent->ID) and now the breadcrumb parent title is translated properly for attachment pages.

    It would be great if you could make this small change to the original nirvana_breadcrumbs function in a future release. 🙂

Viewing 1 post (of 1 total)

The topic ‘Minor change to nirvana_breadcrumbs function for translation’ is closed to new replies.