• kamilpesek

    (@kamilpesek)


    I’d like to ask if it would be possible to add easy support for Polylang. When selecting Root page for custom post types in administration then it would be good to provide respective links and titles on frontend.

    breadcrumb-navxt/class.bcn_breadcrumb_trail.php
    functions
    do_root()
    and
    post_parents()
    ————-
    get_the_title() –>

    function get_wp_post_title(int $pageId): string
    {
        if (function_exists('pll_get_post')) {
            return get_the_title(pll_get_post($pageId));
        }
        return get_the_title($pageId);
    }

    ————-
    get_permalink() –>

    function get_wp_link(int $pageId): string
    {
        if (function_exists('pll_get_post')) {
            return get_permalink(pll_get_post($pageId));
        }
        return get_permalink($pageId);
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Havlik

    (@mtekk)

    Currently, I have a policy of not adding 3rd party code into Breadcrumb NavXT’s core. As a result, support for Polylang is provided by an add on plugin to Breadcrumb NavXT (which handles root page translation). For the foreseeable future, adding this to the core Breadcrumb NavXT plugin probably will not happen.

    Thread Starter kamilpesek

    (@kamilpesek)

    Thank you for your answer. It makes sense. Anyway, in meantime I found own solution for this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Polylang support for titles and permalinks’ is closed to new replies.