Skip Navigation

[Résolu] Displaying image, link, and name of a taxonomy

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

The issue here is that the user had his custom meta image field for his taxonomy but wanted to make that image clickable on the frontend.

Solution:

To do this just follow the method in the example.

<a href='[wpv-taxonomy-url]'> [types termmeta='image' title='%%TITLE%%' size='full'][/types]</a>
This support ticket is created Il y a 6 années et 8 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Marqué : ,

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par lauraC2426 Il y a 6 années et 8 mois.

Assisté par: Shane.

Auteur
Publications
#625257

Hi, I've followed this "how to" https://toolset.com/forums/topic/taxonomy-images-issue/ to display the image of a taxonomy and it works perfectly thanks!
I would know like that the name of the taxonomy shows on hover and that on click to be redirected to the archive page of that taxonomy item. I have been able to display them all side by side but I would like the link to be in the image and the name to only be on hover. I've tried by simply putting the meta of the image but it's not working.

Many thanks in advance!

#625425

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Laura,

Thank you for contacting our support forum.

Can you share with me the exact code that you are using to display the image ? I should be able to modify this so that you can get your desired output.

Thanks,
Shane

#625540

Hi Shane, thanks.
So far it looks like this

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<wpv-loop>
		[types termmeta='image' title='%%TITLE%%' size='full'][/types]</a>
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

So I've managed to add the title on hover, I juste would like to add the link to the taxonomy archive within the image.
thanks 🙂

#625664

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Laura,

Awesome you should be able to make it a link by doing this.

       <a href='[wpv-taxonomy-url]'> [types termmeta='image' title='%%TITLE%%' size='full'][/types]</a>

Please try this and let me know if it helps.
Thanks,
Shane

#625684

It's working perfectly, thanks! 🙂