• Hi there,

    I’d like to list all authors for a particular custom post type. It works fine… BUT, the coauthors_posts_links() function create URL to the usual WP structure and if I have a guest author, it tries to link to its page on the website and I’d like to link to meta data with an external link related to what it is set up in the guest author edit form.

    Is there a wait to distinguish Guest Authors from WP Authors ?

    https://www.ads-software.com/plugins/co-authors-plus/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter julienbayle

    (@julienbayle)

    anyone ?

    Is the only way adding/creating one author for each co-author in order to have the link correctly done ?

    Guest authors only exist as taxonomy terms, so

    $is_guest = is_null( username_exists( $user_login ) );

    should give you your answer (where $user_login is your author).

    pushmusicpro

    (@pushmusicpro)

    Is the author still supporting this plugin…

    hktang

    (@hktang)

    Hi, I was trying to show in the metadata only guest authors and hence need the same test.

    I tried the below code and it works. coauthors is supplied by the plugin to output the coauthors as text.

    $poster = get_the_author();
    $author = coauthors( null, null, null, null, false ); 
    
    if ( $poster != $author )
    {
    	//your stuff here
    }

    hope this helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to find which one is a pure Guest Authors or a real WP authors ??’ is closed to new replies.