• 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() )
    	);
    }

    http://wordpress.org/extend/plugins/toolbox/

    http://wordpress.org/extend/themes/toolbox/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Nick Ottens

    (@ottens)

    *Bump*

    Anyone thoughts?

    I’m looking for this as well.

    I got it in kind of a round about way using wordpress built in functions rather than toolbox.

    Look at content.php and find the first entry-meta div

    <div class="entry-meta">
    			<?php toolbox_posted_on(); ?>

    To get the categories you can add this to the line.

    <div class="entry-meta">
    			<?php toolbox_posted_on(); ?>
    			from category <?php the_category(', '); ?>
    		</div><!-- .entry-meta -->

    to add the authors name you can just tack in

    <?php the_author() ?>

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.