Skip Navigation

[Résolu] Using an image to link to cred child post form

This support ticket is created Il y a 7 années et 7 mois. 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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 réponses, has 2 voix.

Last updated by Tia Il y a 7 années et 7 mois.

Assisted by: Tia.

Auteur
Publications
#427449

Hi

I have an image that I'd like to link to a cred child post form, but the image itself uses a types field to determine the correct version of the image to show, like this:

<em><u>hidden link</u></em> field='rating-average' output='raw'][/types].png

My first attempt was to try this:

 <a href="[cred_child_link_form form='40528' parent_id='-1']"><img src="<em><u>hidden link</u></em> field='rating-average' output='raw'][/types].png" alt="Add your review" align="right"></a>

This is functional, but the URL in my address bar seems to include some irrelevant code and the closing </a> tag, for some reason.

I did some research on the forum and discovered that I could do something like this:

[cred_child_link_form form='40528' parent_id='-1' text='<img src="<em><u>hidden link</u></em> field='rating-average' output='raw'][/types].png"> alt="Add your review" align="right"'>]

But this gives me an error on the front end that says "No Child form page specified", where the image should be.

Is it ok to try to nest codes like this, or should I try it a different way?

thanks

#427804

Tia

Thank you for contacting Toolset Support. I am happy to help you with this.

I'm not sure if that should work. However, let me run a few tests on my end and I will return with results as soon as possible.

#429765

Tia

Hello, Alan.

I have some feedback for you. With this particular shortcode, the text isn't going to parse HTML like this. It's an unexpected usage and there is nothing in the shortcode set to parse dynamically like this.

Therefore, that is correct, it cannot be nested this way.

If you do go this route you may have to get creative with custom functions. Or filter out the extra code output with the first attempt.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.