• I found this in the wp-includes/category-template.php, but I am not the best at php. I want to add alt=”<tag word>” and have the alt tag be the same text as the WordPress tag word itself.

    /**
    * Display the terms in a list.
    *
    * @since 2.5.0
    *
    * @param int $id Post ID.
    * @param string $taxonomy Taxonomy name.
    * @param string $before Optional. Before list.
    * @param string $sep Optional. Separate items using this.
    * @param string $after Optional. After list.
    * @return null|bool False on WordPress error. Returns null when displaying.
    */
    function the_terms( $id = 0, $taxonomy, $before = ”, $sep = ‘, ‘, $after = ” ) {
    $term_list = get_the_term_list( $id, $taxonomy, $before, $sep, $after );

    if ( is_wp_error( $term_list ) )
    return false;

    echo apply_filters(‘the_terms’, $term_list, $taxonomy, $before, $sep, $after);
    }

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘how can I add alt tags to thw post tags?’ is closed to new replies.