Skip Navigation

[Resolved] how to add alternative link text to a dynamic post field with a link

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 4 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2710866

I am building a directory site with profile pages. The profiles will be accessed by the website visitor either clicking the 'Image' or the 'name below the image' to get taken to the profile of the therapist on the website.

I need to set up some sort of alternative text that is unique to the profile image and the profile name so that I can use Google Tag manager to capture the event when a visitor either clicks the image or the name to view their profile page.

I am able to add an alternative image text by setting up a custom field called GTM TAG but there is no equivalent for adding an alternative text (link text) to the profile name that is below the image ... I need to be able to do this as the visitor might choose to click the image or the name.

Is there any documentation that you are following? - not that I can find

Is there a similar example that we can see? yes i already have this set up on a simple website (not built using Toolset) and I successfully capture clicks (events) in GTM and have done for a few years ... the Current website is

hidden link

You will see the thumb nails on the main page ... in fact I use the 'title description' to add the event trigger text for the image .... but the effect would be the same if i used the 'alternative text method'

What is the link to your site?

The site I am building is called

hidden link

#2710868

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I see you are using the blocks to build your view.

Instead of using single field block to display the profile link - what if you try to add the "Fields and Text" block and switch to "Text" mode and then try to add the anchor tag.

For example:

<a href="[wpv-post-url]" alt="[types field='gtm-tag' output='raw'][/types]"> [wpv-post-title]</a>

Where:
- Replace gtm-tag with your original custom field GTM TAG slug.

#2710908

That was really helpful and worked now I will test with my Google Tag Manager account