Forums

Breadcrumb NavXT
Can the plug-in ignore html code in the post title? (9 posts)

  1. paa1605
    Member
    Posted 11 months ago #

    The breadcrumb navxt is a great little plug-in but does anyone know if its possible to make it ignore any html code that may be in the post title? For layout purposes on some of my pages, i often add html in the title when adding a new post, for example..

    <b>NIKE</b> Shoulder Bag

    This then causes problems on my single.php page as the plug-in looks at this code and causes the layout of the breadcrumb div to respond. If possible i would like the plug-in to ignore this code. Anyone know how to do this?

    Thanks.

  2. mtekk
    Member
    Posted 11 months ago #

    This used to be done in the past, then someone requested that it wouldn't strip HTML. I removed the stripping code and introduced a filter in its place. My suggestion is to use that filter, bcn_breadcrumb_title and run your own HTML stripping code. The filter works exactly like normal WordPress filters.

  3. paa1605
    Member
    Posted 11 months ago #

    Thanks for the reply.

    Could you just explain a little more as to what you mean by using the filter and running my own stripping code? I'm quite new to wordpress so don't fully understand what i need to do. I have located the code in the plug-in file breadcrumb_navxt_class.php where it mentions the bcn_breadcrumb_title.

    public function set_title($title)
    {
    //Set the title
    $this->title = apply_filters('bcn_breadcrumb_title', __($title, 'breadcrumb_navxt'));
    }

    Do i need to change this functions to one that strips html?

    Thanks for your patience and help with this.

  4. mtekk
    Member
    Posted 11 months ago #

    I can write a short guide, but I won't have time until the middle of next week.

  5. mtekk
    Member
    Posted 11 months ago #

    Ok, I just realized that there are several areas that bypass the filter. So I won't release a guide to do this yet. I am fixing the filter issue for 4.0, and once the SVN trunk has stabilized I'll write and release the guide. This is mid July time frame, I have a project that is eating up all of my free time in June, and another that will eat up my free time for the first week or so of July. After that I'll be working heavily on Breadcrumb NavXT 4.0.

  6. paa1605
    Member
    Posted 11 months ago #

    Thanks for the reply, i look forward to the new version of the plug-in that will hopefully allow me to do this.

  7. salocined
    Member
    Posted 10 months ago #

    mtekk, any update on the guide above...
    stripping html from crumb.
    thx

  8. mtekk
    Member
    Posted 10 months ago #

    4.0 is delayed a bit due to the two on going projects taking up more than their allotted time. Right now I'm targeting mid to late August.

  9. mtekk
    Member
    Posted 7 months ago #

    The official answer to this is, in Breadcrumb NavXT 4.0 there are templates which have two different title tags, one is %title% which strips out any HTML and %htitle% which passes through HTML. This has been implemented and you are free to try it once I get a beta up (need to write the settings migration script).

Reply

You must log in to post.

About this Plugin

About this Topic