Why doesn´t this work?
[wpv-post-taxonomy-iterator taxonomy="quellen" separator=',</li><li style="display: inline;">']
<a href='[types termmeta="quelle-url"][/types]'>
[wpv-taxonomy-title]
</a>
[/wpv-post-taxonomy-iterator]
It displays the quelle-url ABOVE the link text.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Well - [wpv-post-taxonomy-iterator] is used when you want to loop every item one by one.
What if you try to use the following code:
<ul>
[wpv-post-taxonomy-iterator taxonomy="quellen"]
<li style="display: inline;>
<a href='[types termmeta="quelle-url"][/types]'>[wpv-taxonomy-title]</a>
</li>
[/wpv-post-taxonomy-iterator]
</ul>
More info:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-taxonomy-iterator
Ok, thank you Minesh, now this works for us:
<ul class="linebeneinander" style="display:inline">
[wpv-post-taxonomy-iterator taxonomy="quellen" separator=", "]
<li>
<a href='[types termmeta="quelle-url" output="raw"][/types]' target="_blank">[wpv-taxonomy-title]</a>
</li>
[/wpv-post-taxonomy-iterator]
</ul>
2 final questions:
1. How could we only insert a link for terms that have a quelle-url?
2. How prevent the separator from being wrapped in <p></p>?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
1. How could we only insert a link for terms that have a quelle-url?
====>
It's already wrapped:
<a href='[types termmeta="quelle-url" output="raw"][/types]' target="_blank">[wpv-taxonomy-title]</a>
2. How prevent the separator from being wrapped in <p></p>?
===>
I'm not sure from where its added.
1. It should be possible to decide by wpv-conditional or so for each link, if to display it wrapped in <a> or not?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
What if you try to use the [wpv-conditional] shortcode to display the conditional content:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153493
Does that works?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Can you please try to use the following code and check if that help you to resolve your issue:
[wpv–conditional if="( '[types termmeta="quelle-url" output="raw"][/types]' ne '' )"]
<a href='[types termmeta="quelle-url" output="raw"][/types]' target="_blank">[wpv-taxonomy-title]</a>
[/wpv–conditional]
[wpv–conditional if="( '[types termmeta="quelle-url" output="raw"][/types]' eq '' )"]
[wpv-taxonomy-title]
[/wpv–conditional]
With regular hyphens it works now.
Thank you, Minesh.