how do I insert the function in my code
-
Hi,
I would like to insert the function that calls co-authors plus plugin in my theme.
So, here is my function :
if ( function_exists( 'coauthors_posts_links' ) ) { coauthors_posts_links(); } else { get_the_author(); }
But because the theme on which I’m working is very particular, I have to implement it in my function.php file within this code :
case 'author': $result[] = '<span class="art-postauthoricon">' . sprintf(__('<span class="%1$s">By</span> %2$s', THEME_NS), 'author', 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' ) ), sprintf( esc_attr(__( 'View all posts by %s', THEME_NS )), get_the_author() ), get_the_author() ) ) . '</span>'; break;
I tried every option (ie : shift “get_the_author()” by the whole function), but every time I get a white screen.
What’s the right way to display it correctly ?
Thanks for your help
- The topic ‘how do I insert the function in my code’ is closed to new replies.