[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.
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]"]
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?
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.
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.
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).
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.