I can't seem to correctly adjust the below code to direct the category links to point to '#' instead of pointing to the category page. Any suggestions would be greatly appreciated!
if ( ! function_exists( 'theme_framework_post_cat' ) ) :
function theme_framework_post_cat() {
if ( 'post' == get_post_type() ) {
$categories_list = get_the_category_list( esc_html__( ', ', 'theme' ) );
if ( $categories_list && theme_framework_categorized_blog() ) {
printf( '<span class="cat-links">' . esc_html__( '%1$s', 'theme' ) . '</span>', $categories_list );
}
}
}
endif;
You can try:
strip_tags() is a PHP function that will remove all the tags that are returned by the get_the_category_list WP function.