get_the_category_list example

esc_html__( 'Edit %s', 'twentytwentyone' ),
                    '<span class="screen-reader-text">' . get_the_title() . '</span>'
                ),
                '<span class="edit-link">',
                '</span><br>'
            );

            if ( has_category() || has_tag() ) {

                echo '<div class="post-taxonomies">';

                $categories_list = get_the_category_list( wp_get_list_item_separator() );
                if ( $categories_list ) {
                    printf(
                        /* translators: %s: List of categories. */
                        '<span class="cat-links">' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' </span>',
                        $categories_list // phpcs:ignore WordPress.Security.EscapeOutput                     );
                }

                $tags_list = get_the_tag_list( '', wp_get_list_item_separator() );
                if ( $tags_list ) {
                    printf(
                        

function the_category( $separator = '', $parents = '', $post_id = false ) {
    echo get_the_category_list( $separator$parents$post_id );
}

/** * Retrieves category description. * * @since 1.0.0 * * @param int $category Optional. Category ID. Defaults to the current category ID. * @return string Category description, if available. */
function category_description( $category = 0 ) {
    
Home | Imprint | This part of the site doesn't use cookies.