Skip Navigation

[Resolved] Problem with Tooltips Pro, works with taxonomy field but not with Types field

This thread is resolved. Here is a description of the problem and solution.

Problem:
Client is adding tooltips using the Tooltips Pro plugin, which involves providing the tooltip content as an attribute of a "tooltips" shortcode.

If the content includes a types shortcode to output a Types custom field it doesn't work.

Solution:
Try outputting the raw field value using the wpv-post-field shortcode instead.

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field

This support ticket is created 5 years, 6 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by davidm-13 5 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#1258049

Tell us what you are trying to do?
I'm I'm using "Tooltips Pro" plugin andI have the following tooltips code:
[CODE]
[tooltips keyword="Life form" content="[types field='life-form'][/types]"]

[tooltips keyword="Habitat" content=
"<ul style="padding: 5px; font-size: 14px;">

  • [wpv-post-taxonomy type='habitat' format='name' separator='
  • ']
  • "]
    [/CODE]

    Where keyword="Habitat" the tooltip works ok and I receive a list in the tooltip
    Where keyword="Life form" the field is Types multi lined text field but no tooltip appears
    Any ideas why this should happen and how I can resolve the issue?

    Thanks for any help
    David

    Is there any documentation that you are following?

    Is there a similar example that we can see?

    What is the link to your site?

    #1258213

    Nigel
    Supporter

    Languages: English (English ) Spanish (Español )

    Timezone: Europe/London (GMT+00:00)

    I'm guessing the problem is that the Types field has newline characters whereas the taxonomy is just a comma-separated list, and those newline characters break the tooltips shortcode.

    Could you confirm that by saving a post for testing with the the life-form field just on a single line with no line breaks, and try to display that post in the same way. Does the Tooltip work when it's a single line?

    If so a custom shortcode might be needed to return the field value without the problem newlines, but let's see if that is the issue.

    #1258479

    Hi Nigel, Thanks for the quick response.
    Unfortunately multi-line is not the problem, in this case the text is a single term (one word). the problem seems to be the Types field. I tried with another field which contains a link (url) and the result was the same, when I hover over the field it's highlighted but no box opens - not even an empty one.

    #1259803

    Nigel
    Supporter

    Languages: English (English ) Spanish (Español )

    Timezone: Europe/London (GMT+00:00)

    Instead of using the types shortcode to output the field, could you try with the wpv-post-field shortcode in that case (given that the wpv-post-taxonomy shortcode works fine).

    https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field

    With that shortcode you'll need to include the wpcf- prefix for your Types fields, e.g. wpcf-life-form.

    #1259983

    Thanks Nigel, that's solved the problem.
    Don't know if there's a problem displaying tooltips with Types fields or if it's something I was doing, but maybe the guys at toolset should check if there's a problem.

    Thanks for your support
    David