• Resolved philipt18

    (@philipt18)


    I’ve been playing with code for breadcrumbs. The example given in the documentation is:

    [loop child=this include=this]
      [if not first] > [/if][field title]
    [/loop]

    I modified it to:

    [loop child=this include=this]
      [if not first] > [/if][if not last][field title-link][else][field title][/if]
    [/loop]

    in order to make the current page not a link.

    However, when experimenting with the layout of the breadcrumbs, I found something strange. I modified it to:

    [loop child=this include=this]
    [if not first]
        > [if not last][field title-link][else][field title][/if]
    [/loop]

    and oddly, the item which was not a link was the first one, not the last. It doesn’t seem to make sense, but that’s what happened. Anyone have an idea why?

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter philipt18

    (@philipt18)

    Oops, I forgot to enclose that last bit of code, so you can’t see it completely. This is it:

    [loop child=this include=this]
      [if not first]<br />&nbsp;&nbsp;&nbsp; > [if not last][field title-link][else][field title][/if]
    [/loop]
    Thread Starter philipt18

    (@philipt18)

    Somehow I ended up losing the first [/if] which is what messed everything up. Resolved.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Reversed Breadcrumbs’ is closed to new replies.