Skip Navigation

[Resuelto] Get tag with Tags fields icon

This support ticket is created hace 3 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Luo Yang hace 3 años, 7 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#2029299
2021-04-22 08_47_21-Editar la etiqueta _ Playas de España _ Información sobre las Playas de España —.png

Hi,

I need to get_the_term_list and the icon. I can't find how to get de icon.

Know I use this code in the single.php

<?php echo get_the_term_list( $post->ID, 'post_tag', '<p>Servicios: ', ', ', '</p>');?>

Thanks!

#2029441

Hello,

I suggest you try with a taxonomy view, for example:
1) Dashboard-> Toolset-> Settings-> General
in section "Editing experience", enable option "Show both the legacy and Blocks interface and let me choose which to use for each item I build"

2) Dashboard-> Toolset-> Views, create a new taxonomy view:
- Query Tag terms
- Filter by:
Taxonomy is set by the page where this View is inserted
- In views loop, display the custom taxonomy field "icon"

3) In your custom PHP codes, use render_view() function to display above taxonomy view:
https://toolset.com/documentation/programmer-reference/views-api/#render_view

#2031807
2021-04-22 08_47_21-Editar la etiqueta _ Playas de España _ Información sobre las Playas de España —.png
2021-04-24 17_36_16-Settings ‹ Playas de España _ Información sobre las Playas de España — WordPress.png

Hi,

I don't see this option:
1) Dashboard-> Toolset-> Settings-> General

How I get the icon image?

<?php
$tags = get_the_tags($post->ID);
if ($tags) {
foreach( $tags as $tag ) {

echo'<ul class="list-group">';
echo '<li class="list-group-item">'.$tag->name.'';
echo'';
}
}
?>
Thanks

#2032663

You need to install Toolset Blocks plugin, and you can download it here:
https://toolset.com/account/downloads/