Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

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

Home Forums Support [Resolved] Co-Authors Plus into GP without much fuzz or updating templates

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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #311574
    Kristian Foshaug

    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.

    #311579
    Tom
    Lead Developer
    Lead Developer

    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/

    #311629
    Kristian Foshaug

    Awesome, thanks 🙂

    #311802
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

    #410226
    Russell

    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?

    #410370
    Tom
    Lead Developer
    Lead Developer

    Can you link me to one of the posts?

    #411254
    Russell

    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

    #411435
    Tom
    Lead Developer
    Lead Developer

    Awesome! 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.