[Resuelto] conditionally remove html table headings
This support ticket is created hace 6 años, 10 meses. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi.
I have a View which display things with a html table.
In the content template i have a condition for date, like:
[wpv-conditional if="( $(wpcf-thedate) gte 'TODAY()' )"]
If no entries have a date after today i want NOTHING to show.
But how do i remove the table headings?
And this is in the "Loop Output Editor":
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<table width="100%">
<thead>
<tr>
<th style="font-size: 14px; font-weight: normal;">Course start</th>
<th style="font-size: 14px; font-weight: normal;">Length</th>
</tr>
</thead>
<tbody class="wpv-loop js-wpv-loop">
<wpv-loop>
<tr>
[wpv-post-body view_template="Loop item in Show Town and Date"]
</tr>
</wpv-loop>
</tbody>
</table>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found] [wpml-string context="wpv-views"][/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
------------------------------------------------------------------
I don't want "Course start" and "Length" table heading to show at all when no items have dates in the future.
Well - $(".mytable tr:has(td)").length will check for tag td inside the TR tag.
Is it possible for you to share temporary access details so that I can quickly fix this for you.
Please share problem URL where you added your view.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
Let's take a weekend break, i'll continue next week why it's not working on my site.
But the code you sent looks good, i'll keep testing.
We can close this ticket for now.
Thank you for all you help.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.