• First, I just want to say thanks for the great plugin. I couldn’t find a function that displays the ‘Biographical Info’ (i.e., co-author descriptions) of my Guest Authors, so I made a small/minor change to the plugin. The modification appears to be working, but I’m not an experienced coder, so there’s a pretty good chance I did something incorrent. I was hoping that you might review the change and consider incorporating it (or something similar) into the plugin in a future version.

    Here’s what I did: In the template-tags.php file I added the following code:

    function coauthors_descriptions( $between = '</p><p>', $betweenLast = '</p><p>', $before = '<p>', $after = '</p>', $echo = true ) {
    	return coauthors__echo( 'get_the_author_meta', 'tag', array(
    		'between' => $between,
    		'betweenLast' => $betweenLast,
    		'before' => $before,
    		'after' => $after,
    	), 'description', $echo );
    }

    That’s it. And in my template file where I want the descriptions to appear I put the following:

    <?php coauthors_descriptions(); ?>

    Again, this seems to be working fine, but I’m not sure if I made a mistake or if there’s a better way to do it. I’m sure I’m not the only one who’d really appreciate it if you could add this or something similar to the plugin in a future version.

    • This topic was modified 6 years, 4 months ago by richlivi.
Viewing 5 replies - 1 through 5 (of 5 total)
  • It should be fine, however, Recommend you move that function to theme > functions.php, so future plugin patch won’t erase it.

    Thread Starter richlivi

    (@richlivi)

    Thanks for the reply. I’ll definitely move the function to my functions.php file.

    Since it looks like there isn’t already a function that will display the guest author biographical info (like there is with the other author data), would you consider adding what I did to the plugin so that I and others don’t need to use a separate function?

    Hi there,
    thanks for your code – I have opened an issue on GitHub so that it won’t get lost in the flow here ??

    Have a nice day,
    Stefano

    Thread Starter richlivi

    (@richlivi)

    Thank you for doing that, Stefano. I really appreciate it, and I’m sure others will too if/when it gets added.

    How can I insert the user social profile with coauthor?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Guest Author Descriptions’ is closed to new replies.