• Resolved dolarcher

    (@dolarcher)


    Hi,
    how can I define a custom word per page for the trail.

    Currently it looks like this: home > Winter Jacket 2017 > Winter Jacket are the best for the winter > Winter jacket for cold days

    I only want to set one custom word/custom words per page.
    It should look like that: home > Jacket > Winter

    How can I do that?
    Could you please give me a good explanation, my skills in programming are not the best.
    Thank you in advance!

    Best regards,
    dolarcher

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

    (@mtekk)

    The easiest way to do this is via the Breadcrumb NavXT Title Trixx extension plugin, it allows you to specify a custom breadcrumb title for every taxonomy term and post (of any type). Otherwise, you’ll need to write code that hooks into the bcn_breadcrumb_title filter.

    Thread Starter dolarcher

    (@dolarcher)

    Hi John,
    thank you for your prompt message.

    How do I write such a hook:
    I found this:

    $title = apply_filters( ‘bcn_breadcrumb_title’, $title, $this_type, $this_id );

    if ( !empty( $title ) ) {

    // everything has led up to this point…

    }

    Now I want to change the breadcrumb title from ‘Winter Jacket 2017’ to ‘Jacket’ –> it is a page and has the id=180.
    How can I do that now and where do I have to place the code?

    Thank you for your great support.
    Regards,
    dolarcher

    Plugin Author John Havlik

    (@mtekk)

    In general, you should place custom code in a site specific plugin. As to how to write a hook, some of the other filters have examples in the Breadcrumb NavXT Documentation (e.g. see https://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/2/#bcn_breadcrumb_url), you will just have to do things slightly differently for your specific use case.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘custom title per page’ is closed to new replies.