Lego2012
12/13/2016 - 2:58 PM

Function to display unlinked comma separated category names

Function to display unlinked comma separated category names

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

function the_category_unlinked() {
    $categories = get_the_category();

    $categories = wp_list_pluck( $categories, 'name' );

    $categories = implode( ', ', $categories );

    echo $categories;
}