Currently I have a taxonomy views loop that does this:
[wpv-layout-start]
[wpv-items-found]
<strong>Tickers:</strong>
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-body view_template="loop-item-in-ticker-terms"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[/wpv-no-items-found]
[wpv-layout-end]
And the template "loop item in ticker terms" is simply this:
The problem is that the last item in the loop always includes the trailing "/"
So I THINK this is the correct implementation. Could somebody check?
[wpv-layout-start]
[wpv-items-found]
<strong>Tickers:</strong>
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-body view_template="loop-item-in-ticker-terms"]
[wpv-item index=pad-last]
[wpv-post-body view_template="loop-item-in-ticker-terms-last"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[/wpv-no-items-found]
[wpv-layout-end]
I have created an additional content temple "loop item in ticker terms last"
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
That's close, but not quite correct.
You can see the correct format if you use the Loop Wizard and choose the List with Separators format, designed for the use case where you have a list separated by—say—commas, but you don't want a comma after the last item.
Given that your linked templates are so simple they are rather redundant and you could just put the shortcodes within the loop directly, e.g.
<wpv-loop>
[wpv-item index=other]
[wpv-taxonomy-link] /
[wpv-item index=last]
[wpv-taxonomy-link]
</wpv-loop>
Excellent response! Thank you. You can close the ticket.