Site logo

Archived topic

Co-Authors Plus into GP without much fuzz or updating templates

7 replies · Started by Kristian Foshaug on April 28, 2017

Viewing posts 1–8 of 8

Is there any way to incorporate coauthors plus into GP without having to update the templates? Or does anyone have a "multiple authors"-plugin that could work without much fuzz?

Documentation here: https://vip.wordpress.com/documentation/incorporate-co-authors-plus-template-tags-into-your-theme/

To integrate Co-Authors Plus, you’ll want to replace existing author template tags in your theme with a simple conditional that uses the Co-Authors Plus template tags if Co-Authors Plus is available.

According to their docs, this should work:

add_filter( 'generate_post_author_output','tu_coauthors_plus' );
function tu_coauthors_plus() {
	printf( ' <span class="byline">%1$s</span>',
		function_exists( 'coauthors_posts_links' ) ? coauthors_posts_links( null, null, null, null, false ) : ''
	);
}

I don't have the plugin to test it, so let me know if you run into any issues :)

Adding PHP: https://docs.generatepress.com/article/adding-php/

Awesome, thanks :)

You're welcome :)

Hi Tom,

I'm attempting to use the co author plug in with the code listed above, and I'm stuck.

I was able to
1) add the php code above via snippets
2) install the plug in
3) add the guest author on the posts' edit page

But I'm unable to see the guest author in the draft or published page.

What am I missing?

Can you link me to one of the posts?

I stand self-corrected » I went back and found I click the "save" and not the "save and activate" button in snippets » all good now

» agnetic.com

Awesome! :)

This archived topic is closed to new replies.