Implementing template tags in Misty Lake
-
I’m trying to integrate Co-Author Plus’ template tags with the Misty Lake theme per these instructions, but I cannot get co-authors to show up on the front end. I added this code snippet to single.php:
if ( function_exists( 'coauthors_posts_links' ) ) { coauthors_posts_links(); } else { the_author_posts_link(); }
but no dice. Misty Lake has the function mistylake_posted_on, so I added the snippet:
if ( ! function_exists( 'mistylake_posted_on' ) ) : /** * Integrate Co-Authors Plus with Misty Lake by replacing mistylake_posted_on() with this function */ function mistylake_posted_on() { if ( function_exists( 'coauthors_posts_links' ) ) : printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'mistylake' ), 'meta-prep meta-prep-author', sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), coauthors_posts_links( null, null, null, null, false ) ); else: printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'mistylake' ), 'meta-prep meta-prep-author', sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', get_author_posts_url( get_the_author_meta( 'ID' ) ), esc_attr( sprintf( __( 'View all posts by %s', 'mistylake' ), get_the_author() ) ), get_the_author() ) ); endif; } endif;
to all the files which call mistylake_posted_on: content-format.php, content-single.php and content.php (these are all the places mistylake_posted_on turned up when I grepped the term in the theme’s directory). Still no dice. Added it to single.php. No dice.
I am flummoxed. Should I be taking a different tack with this? The only other thing I can think of is adding trying to tie it to the conditional is_single(). Anyone have any thoughts?
The page I need help with: [log in to see the link]
- The topic ‘Implementing template tags in Misty Lake’ is closed to new replies.