Hi I have a dropship directory website with lots of companies (wholesalers, dropshippers, etc.). I have created most of my Content Template for each supplier but I was wondering if it was possible to display the Tags of each individual supplier into a Table (with even rows/columns) instead of separating each tag with a "," or something like that (see attachment)? You'll notice I have a table for the company's full profile but I can't figure out how to show the tags in a table format so it doesn't look so unorganized. I am looking to display the suppliers' specific products (product type, brand name, etc.) as the Tags but have it appear in a table so it's easier to read. Please help. Thank you!
Hi, instead of using the wpv-post-taxonomy shortcode to display a list of terms associated with the current post, you can create a View of the Tags taxonomy and add a Query Filter. Set the Query Filter to filter by term, set by the current post. Then using the Loop Wizard you can create a table or a Bootstrap grid to display the terms associated with the current post (if your theme is compatible with Bootstrap). If you need more detailed information about creating this type of display in the Loop Wizard, we have more information available here:
https://toolset.com/documentation/user-guides/view-layouts-101/
https://toolset.com/documentation/user-guides/digging-into-view-outputs/
Ok thanks for the fast reply. But now each tag inside the table includes the "Save This Supplier" favorites button (see IMG 1 attachment). I only want that button to display once on that page instead of in each tag. Can you help me fix that?
On another note, one of my rows has "Notes" about the Supplier. Some suppliers don't have any notes in that section (see IMG 2 attachment). You will notice that it's just a blank section for the suppliers without any notes. Is there a way to completely hide that row for the suppliers who don't have any notes? Looking forward to your reply. Thanks!
But now each tag inside the table includes the "Save This Supplier" favorites button (see IMG 1 attachment). I only want that button to display once on that page instead of in each tag. Can you help me fix that?
How is that button added to the View? If it's a shortcode you inserted in the loop or template, you should remove it and add it outside the loop.
Is there a way to completely hide that row for the suppliers who don't have any notes?
You can check out our documentation for conditional HTML here: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
If you need more detailed information, feel free to open a separate ticket so we can discuss. Our policy is one topic per ticket, to help keep things organized. Thanks!
The "Save This Supplier" button comes from the FAVORITES plugin I installed to allow users to save supplier(s) they like. The website to the plugin is hidden link in case you wanted to see it. I attached 2 screenshots of what it looks like inside my wordpress admin so you can see the options it gives me. You'll notice I selected the option that says "include after content"...that way the button will appear at the bottom of each specific supplier page. I just don't want it to appear inside each tag within the table.
Okay thanks. Can you copy + paste the contents of your View's loop editor panel here for me to review? I might be able to suggest a change to suppress these buttons in the View.
The contents I have in the View's Loop editor panel are below:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="3" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-sm-4">[wpv-post-body view_template="loop-item-in-tags-view-test"]</div>
[wpv-item index=other]
<div class="col-sm-4">[wpv-post-body view_template="loop-item-in-tags-view-test"]</div>
[wpv-item index=3]
<div class="col-sm-4">[wpv-post-body view_template="loop-item-in-tags-view-test"]</div>
</div>
[wpv-item index=pad]
<div class="col-sm-4"></div>
[wpv-item index=pad-last]
<div class="col-sm-4"></div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
And the contents I have in my Content Template editor are below:
<h1 style="margin-bottom:0px;border-top:2px solid #5E5E5E;border-left:2px solid #5E5E5E;border-right:2px solid #5E5E5E;border-bottom:1px solid #5E5E5E;border-top-left-radius: 8px;border-top-right-radius: 8px;background-color:#909090;color:#ffffff;"><center>[wpv-post-title]</center></h1>
[su_table responsive="yes"]<table style="width:100%;text-align:left;background-color:#EBEBEB !important;border-right:1px solid #ffffff !important;font-family:sans-serif;font-size:14px;">
<tr>
<td style="width:25%;background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Address</td>
<td style="width:75%;background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='address'][/types]</td>
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Website</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='supplier-website' target='_blank'][/types]</td>
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Contact</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='supplier-contact-us-page' target='_blank'][/types]</td>
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Email</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='supplier-email' separator=' <br />'][/types]</td>
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Phone</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='supplier-phone' separator=' <br />'][/types]</td>
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Fax</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='supplier-fax'][/types]</td>
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Shipping Region</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='supplier-shipping-region'][/types]</td>
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Shipping Method</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='supplier-shipping-method'][/types]</td>
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Approved For</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='approved-for' state="checked" option="0"]✔ Ebay[/types][types field='approved-for' state="unchecked" option="0"]❌ Ebay[/types] <br />[types field='approved-for' state="checked" option="1"]✔ Amazon[/types][types field='approved-for' state="unchecked" option="1"]❌ Amazon[/types] <br />[types field='approved-for' state="checked" option="2"]✔ Online Store[/types][types field='approved-for' state="unchecked" option="2"]❌ Online Store[/types]
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;border-bottom:1px solid #FBFBFB !important;">Supplier Type</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='supplier-type' state="checked" option="0"]✔ Dropshipper[/types][types field='supplier-type' state="unchecked" option="0"]❌ Dropshipper[/types] <br />[types field='supplier-type' state="checked" option="1"]✔ Wholesaler[/types][types field='supplier-type' state="unchecked" option="1"]❌ Wholesaler[/types] <br />[types field='supplier-type' state="checked" option="2"]✔ Affiliate[/types][types field='supplier-type' state="unchecked" option="2"]❌ Affiliate[/types]
</tr>
<tr>
<td style="background-color:#EBEBEB !important;color:#5E5E5E;padding:7px;">Notes</td>
<td style="background-color:#ffffff;color:#5E5E5E;padding:7px;border:1px solid #EBEBEB !important;">[types field='notes'][/types]</td>
</tr>
<tr>
<td colspan="2" style="background-color:ffffff;padding-top:20px !important;padding-bottom:20px !important;">[wp-svg-icons icon="warning" wrap="i"] Problem with the Supplier? Click here to let us know.</td>
</tr>
</table>[/su_table]
[su_spoiler title="Notes" open="yes" style="fancy" icon="caret"]<font style="color:#5E5E5E;font-family:sans-serif;font-size:14px;">[types field='notes'][/types]</font>[/su_spoiler]
[su_spoiler title="Products" open="yes" style="fancy" icon="caret"]<font style="color:#5E5E5E;font-family:sans-serif;font-size:14px;">[wpv-post-taxonomy type="post_tag" format="name"]</font>[/su_spoiler]
[wpv-view name="tags-view-test"]
You can try adding suppress_filters="true" to each wpv-post-body shortcode in the loop:
[wpv-post-body view_template="loop-item-in-tags-view-test" suppress_filters="true"]
If this doesn't solve the problem, I'll have to take a closer look.
Sorry I’m not sure what you mean. Where would I copy and paste that shortcode you just gave me? Would I put it in the VIEWS Loop Wizard or the CONTENT TEMPLATE? Also where would I post it? I’m not sure what you mean when you say to add suppress_filters=“true” to each wps-post-body shortcode. What part is considered to be a wps-post-body shortcode in my document? Sorry I’m somewhat new to html and css and shortcodes and all that. I copied/pasted that full shortcode you gave at the bottom of both VIEWS Loop Wizard and the CONTENT TEMPLATE but that didn’t seem to do the trick so maybe I am misunderstanding what you said to do. Thanks!
Actually I was able to figure out what you meant so it works now. I will go ahead and switch the ticket status to "Resolved" and I will open a new ticket with my other question I heard earlier in my other message. Thanks for your help!
My issue is resolved now. Thank you!