Add category name to Toolbox post header / entry-meta
-
How do I add a single post’s category to the header in the Toolbox theme?
What it says now:
Posted on January 21, 2012 by Nick Ottens
What I’d like it to say:
Posted on January 21, 2012 in Politics by Nick Ottens
This is the code from the functions.php:
function toolbox_posted_on() { printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="byline"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'toolbox' ), esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'toolbox' ), get_the_author() ) ), esc_html( get_the_author() ) ); }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Add category name to Toolbox post header / entry-meta’ is closed to new replies.