Skip Navigation

[Resolved] Get terms from children posts 2

This support ticket is created 4 years, 4 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by romanB-3 4 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#1728531

Hi,

I thought this issue was fixed but now I noticed there still is some posts on where the code writtent here https://toolset.com/forums/topic/get-terms-from-children-posts/page/2/#post-1708563 doesn't work.
As an example please see hidden link that returns : "Droit (8), Droit (1), Droit (1)", where the correct result should be "Droit (10)".

This code is also causing another problem, reported here and that I also thought solved, but is not : https://toolset.com/forums/topic/prefilter-filters-on-term-archive-page/page/2/#post-1715813
The suggested snippet

      [wpv-conditional if="( '[show_related_domaines2]' gt 0 )"]
      <hr>
      <h2>Domaines de formation<span class="seo-friendly"> de l'établissement</span></h2>
      [show_related_domaines view="liste-des-domaines-de-formation-de-cet-etablissement"]
      [/wpv-conditional]

crashes the pre-filter of multiselect choices at loading the page : all available choices are displayed in the selects. But if I remove the snippet, the filters only display choices for which there is result (which is the expected behaviour).

Thank you.

#1729377

Hi,

Thank you for contacting us and I'd be happy to assist.

During troubleshooting, I noticed that some empty spaces were being included in the output of the view "Liste des domaines de formation de cet établissement".

I've removed all line breaks and empty spaces from that view's "Loop Editor" section and both issues seem to have been fixed.
( screenshot: hidden link )

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1729417

Hello and thank you,
The first issue seems indeed solved thanks to you.
The second one isn't however:
hidden link
- when loading the page, every "Domaine", "Niveau" and "Type" are available choices in filters;
- when choosing one filter, then deleting it, there is none selected again, but now they are pre-filtered, and choices are limited to those having results.
Thank you.

#1731227

Hi,

Thank you for sharing these details.

During troubleshooting, I noticed that from the "Output Editor" section of the view "Liste des domaines de formation de cet établissement", the "[wpv-filter-meta-html]" shortcode, had been removed.

I've added it back and now only the relevant filter options are showing on the initial page load too.

regards,
Waqar

#1731247

My issue is resolved now. Thank you very much!