Support » Plugin: Taxonomy Images » link title

  • Hello, I need to display the title attribute related to the tag permalink but I don’t know how to get it…
    My code is:

    print apply_filters( 'taxonomy-images-list-the-terms', '', array(
        'before'       => '<div class="optional-prodotto">',
        'after'        => '<br>'.$legenda.'</div>',
        'before_image' => '<span class="tag-optional">',
        'after_image'  => '</span>',
        'image_size'   => 'detail',
        'post_id'      => $post,
        'taxonomy'     => 'product_tag',
    ) )

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have this question as well. The link output doesn’t seem to include a title (for tooltip usability this would be nice to have).

    Hello, try this code from the plugin documentation:

    
        $terms = apply_filters( 'taxonomy-images-get-terms', '', array(
            'taxonomy'     => 'product_tag',     
            'hide_empty' => false,
            ) );
            if ( ! empty( $terms ) ) {
                print '<div class="container" style="padding-top:50px;">';
                foreach ( (array) $terms as $term ) {
    
                print'<div class="listcategory" >';
                print'<div class="category-content" ><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '"><h2>'.$term->name.'</h2></div>';
                print'</a>';
                print '<div class="category-thumb">' . wp_get_attachment_image( $term->image_id, 'medium' ) . '</div>';
                print '<div class="cat-description">'.$term->description.'</div>';
                print '</div>';
                }
                print '</div>';
                
            }
    • This reply was modified 1 year, 9 months ago by  ilpert.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘link title’ is closed to new replies.