[wpv-conditional if="( '[wpv-found-count]' ne '0' )"]
[wpv-layout-start]
<div id="tax_listOrg" class="divTaxOrg">
[wpv-conditional if="( '[wpv-found-count]' gt '1' )"]
<span style="font-weight:bold;">Organizations: </span>[/wpv-conditional]
[wpv-conditional if="( '[wpv-found-count]' eq '1' )"]
<span style="font-weight:bold;">Organization: </span>[/wpv-conditional]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-item index=1]
[wpv-taxonomy-link]
[wpv-item index=other]
<span class="lft">, </span>[wpv-taxonomy-link]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"][/wpml-string]
[/wpv-no-items-found]
</div>
[wpv-layout-end]
[/wpv-conditional]
If I change [wpv-taxonomy-link] to [wpv-taxonomy-title] it doesn't display anything.
Noman
Supporter
Languages:
English (English )
Timezone:
Asia/Karachi (GMT+05:00)
Hi Randall,
Thank you for contacting Toolset support. These 2 shortcodes are meant to be used in a Taxonomy View:
[wpv-taxonomy-link] - [wpv-taxonomy-title]
If you are using WordPress Archive View then this is the shortcode you would need to use:
[wpv-taxonomy-archive info="name"]
Attributes for this shortcode can be seen here:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive
Please let us know if you are using some other type of View. Thank you
Hi,
I am using a taxonomy view.
Tried your shortcode, not working.
Noman
Supporter
Languages:
English (English )
Timezone:
Asia/Karachi (GMT+05:00)
Hello,
Okay, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and check the issue.
Your next answer will be private which means only you and I have access to it.
=== Please backup your database and website ===
✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.
✙ Please provide link to [Taxonomy View] Edit Screen and [Page] Edit Screen where you have inserted this View.
Thank you
Noman
Supporter
Languages:
English (English )
Timezone:
Asia/Karachi (GMT+05:00)
Thank you for providing login info. I have checked your setup, I can see there are lots of conditions being applied in the View and above this shortcode which is causing the issue.
The shortcode itself is working good, its the conditional setup causing the trouble. I will investigate this further and get back to you with my findings.
Thank you
Noman
Supporter
Languages:
English (English )
Timezone:
Asia/Karachi (GMT+05:00)
I have updated conditional output in your View and now it shows Taxonomy term title just fine:
hidden link
This is the updated View code:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<div id="tax_listOrg" class="divTaxOrg">
[wpv-conditional if="( '[wpv-taxonomy-title]' ne '' )"]
<span style="font-weight:bold;">Organization: </span>
[/wpv-conditional]
<wpv-loop>
[wpv-item index=1]
[wpv-conditional if="( '[wpv-taxonomy-title]' ne '' )"]
[wpv-taxonomy-title]
[/wpv-conditional]
[wpv-item index=other]
[wpv-conditional if="( '[wpv-taxonomy-title]' ne '' )"]
, [wpv-taxonomy-title]
[/wpv-conditional]
</wpv-loop>
</div>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<div id="tax_listOrg" class="divTaxOrg">
[wpml-string context="wpv-views"]No items found[/wpml-string]
</div>
[/wpv-no-items-found]
[wpv-layout-end]
Your original View code backup:
hidden link
I hope its good now, thank you
Hi,
How can I remove the space between commas?
Also, why do I need to put conditional statements around the output? It this some kind of bug or something?
Noman
Supporter
Languages:
English (English )
Timezone:
Asia/Karachi (GMT+05:00)
Hello,
1. I can not see the spaces and comma on this page, but to remove space before comma I just deleted the extra space like this:
[wpv-conditional if="( '[wpv-taxonomy-title]' ne '' )"], [wpv-taxonomy-title][/wpv-conditional]
hidden link
2. No this is not bug. The conditions were added in your original View, so I also added it to the new one.
Thank you