I’m trying to figure this out too.
I made a new function.
Now just trying to figure out why %1$s produces the anchor tag version of the category name instead of just the plain text format instead??
I’m thinking it partly has to do with this as well: = __
?? Not too sure? Cause the normal Category reference: %s
does not work either in place of %1$s.
if ( ! function_exists( 'designconcepts_posted_under' ) ) :
/**
* Prints HTML with title information for the current single post (category title).
*
* @since Design Concepts 1.0
*/
function designconcepts_posted_under() {
// Retrieves tag list of current post, separated by commas.
$tag_list = get_the_tag_list( '', ', ' );
if ( $tag_list ) {
$posted_in = __( '%1$s', 'designconcepts' );
} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
$posted_in = __( '%1$s', 'designconcepts' );
} else {
$posted_in = __( '%1$s', 'designconcepts' );
}
// Prints the string, replacing the placeholders.
printf(
$posted_in,
get_the_category_list( ', ' ),
$tag_list,
get_permalink(),
the_title_attribute( 'echo=0' )
);
}
endif;