Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Så här addar du flera författare (medförfattare) för publicerade posts i WordPress

Vill du add to flera författare för posts i WordPress?

Många websites har flera författare som arbetar på samma artikel. Det är viktigt att kreditera alla dessa medförfattare, men som standard tillåter WordPress dig bara att lägga till en enskild författare till en page eller ett post.

I den här artikeln visar vi dig hur du lägger till flera författare för poster i WordPress.

How to add multiple authors (co-authors) for posts in WordPress

Så här skapar du flera författare (medförfattare) för publicerade posts i WordPress

Det enklaste sättet att add to flera författare till ett WordPress post är genom att använda den gratis Co-Authors Plus plugin.

I följande image kan du se att detta plugin tillåter dig att kreditera alla användare som redan är registrerade på din WordPress website.

Showing multiple authors in a multi-author WordPress blog

Co-Author Plus addar också en new användartyp Guest Authors, som låter dig kreditera författare som inte har ett account på din WordPress blogg.

Det första du behöver göra är att installera och aktivera Co-Authors Plus plugin. Om du behöver hjälp, vänligen se vår guide om hur du installerar ett plugin för WordPress.

När pluginet är aktiverat behöver du bara editera den post där du vill kreditera flera författare.

I den högra tabben i content editor rullar du bara till den nya sectionen ”Authors” och förstorar den med ett click.

Adding multiple authors to a WordPress website

På tabben Authors kan du klicka på fältet ”Select An Author” och sedan skriva in namnet på den registrerade användare som du vill kreditera. När rätt person dyker upp i dropdown-menyn klickar du bara för att lägga till den här författaren i din post.

Creating a multi-author WordPress blog

Du kan nu add to flera författare genom att följa processen som beskrivs ovan.

Som standard kommer WordPress att visa dessa medförfattare i den ordning du addade dem till posten. Om du behöver ändra ordern klickar du bara på uppåt- och nedåtpilarna som visas bredvid varje namn.

Changing the order of multiple WordPress authors

Om du vill ta bort en medförfattare från posten klickar du bara på ikonen X bredvid personens namn.

När du har krediterat alla dina medförfattare kan du publicera eller updating detta post. För hjälp med att hantera dina författare kan du se vår guide om hur du effektivt attraherar och hanterar gästbloggare i WordPress.

Visa flera författare på din blogg med flera författare

Beroende på ditt WordPress theme, kanske detta plugin inte automatiskt visar flera författare för poster i WordPress. Detta innebär att du måste editera dina theme-filer.

Om du inte har editerat dessa filer tidigare, vänligen se vår guide om hur du kopierar och klistrar in kod i WordPress.

Innan du editerar koden i ditt theme är det också en bra idé att skapa en backup. Backups allow you to quickly återställ your WordPress site in case something goes wrong.

Det finns många gratis och betalda tillägg för backup av WordPress som du kan använda, inklusive Duplicator. För en detaljerad genomgång kan du också se vår guide om hur du tar backup av din WordPress site.

När du har skapat en backup måste du editera koden som ansvarar för att visa författarens namn.

Denna kod är vanligtvis antingen funktionen_author() eller funktionen_author_posts_link().

Beroende på ditt tema kan du hitta den här funktionen i ditt temas single.php, content.php eller functions.php-fil. För mer information, se vår guide om hur du hittar vilka temafiler som ska editeras i WordPress.

När du har hittat en av dessa funktioner måste du ersätta den med följande snippet:

if ( function_exists( 'coauthors_posts_links' ) ) {
    coauthors_posts_links();
} else {
    the_author_posts_link();
}

Låt oss se hur du kan skapa en blogg med flera författare med hjälp av det populära OceanWP-temat.

Om du öppnar det här temats functions.php-fil hittar du en the_author_posts_link-funktion:

public static function the_author_posts_link( $link ) {
 
        // Add schema markup.
        $schema = oceanwp_get_schema_markup( 'author_link' );
        if ( $schema ) {
            $link = str_replace( 'rel="author"', 'rel="author" ' . $schema, $link );
        }
 
        // Return link.
        return $link;
 
    }

För att visa flera auktoriseringar i WordPress behöver vi bara ersätta denna section med code snippet under:

public static function the_author_posts_link( $link ) {
 
        // Add schema markup.
        if ( function_exists( 'coauthors_posts_links' ) ) {
            coauthors_posts_links();
        } else {
            the_author_posts_link();
        }
         
        // Return link.
        return $link;
 
    }

När du har lagt till den här koden rullar du längst ner på vyn.

You can then go ahead and click on the ”Update File” button.

The WordPress theme customizer

Om du nu besöker din site ser du att flera författare krediteras på din WordPress post.

Alternativ: Istället för att editera dina theme-filer, vilket kan förstöra din website, kan du säkert lägga till koden ovan med hjälp av pluginet WPCode. För steg-för-steg-instruktioner, se vår tutorial om hur du enkelt lägger till custom code i WordPress.

Lägga till gästförfattare till din WordPress-blogg med flera författare

Co-Authors Plus plugin kan leta upp och visa registrerade användare på din multi-author WordPress blogg.

Men vad händer om du vill kreditera en gästförfattare som inte redan har ett konto på din webbplats?

Även om du kan skapa ett konto för författare är detta inte alltid det säkraste alternativet.

Även om WordPress har roller och capabilities för användare är det alltid en risk att ge någon tillgång till ditt admin area eller skrivrättigheter på din website. För mer detaljer om hur du skyddar din website kan du läsa vår ultimata guide till säkerhet i WordPress.

Med detta i åtanke kan du använda Co-Authors Plus för att skapa gästförfattare. Du kan sedan kreditera flera gästförfattare på ett enskilt inlägg utan att de någonsin har tillgång till ditt WordPress admin area.

För att skapa en gästförfattare, head över till Användare ” Gästförfattare. Härifrån kan du klicka på ”Add New”.

Adding multi authors to your WordPress blog

På nästa vy måste du skriva in all information om den här personen i formuläret ”Add New Guest Author”.

Du kan också uppladare en image som kommer att fungera som denna författares avatar. Så länge ditt theme stöder avatarer kommer den här bilden att visas tillsammans med författarens namn på din website.

Adding WordPress multiple authors

Om du inte uploadar en avatar kommer WordPress att leta efter en Gravatar som är linkad till gästförfattarens email address. För More information, vänligen se vår guide om hur du ändrar standard Gravatar på WordPress.

När du har skrivit in all denna information fortsätter du och klickar på knappen ”Lägg till ny gästförfattare”.

WordPress kommer nu att skapa denna person som gästförfattare. För att kreditera dem som medförfattare följer du helt enkelt samma process som beskrivs ovan.

Vi hoppas att den här artikeln hjälpte dig att lära dig hur du addar flera författare (medförfattare) för Post i WordPress. Därefter kan du se vår guide om hur du tjänar pengar på att blogga online med WordPress, eller se vårt expertval av de bästa tillägg och tools för sökmotorsoptimering i WordPress som du bör använda.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

32 kommentarerLämna ett svar

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Dennis Muthomi says

    hi, I’m about to hire my first inhouse writer for my website, and I want to make sure they get proper credit for their work. I noticed that in this article, you have ”Written by:” and ”Reviewed by:” sections at the top.
    It’s a great way to acknowledge the different roles people play in creating content. I’m curious – are you using a plugin to achieve this, or did you add a custom code snippet?

      • Dennis Muthomi says

        thank you for responding and confirming that you’re using a custom snippet to display multiple authors sir.
        well, I will just have to use the Co-Authors Plus plugin, it will get the job done.

  3. AL says

    How to add ”Updated By” or in this article, ”Reviewed By”? Is there a specific plugin for this? Thanks.

    • WPBeginner Support says

      For the moment that is something we are testing, if we have a way we would recommend adding it we will be sure to share, for the moment you would need to modify your theme’s templates.

      Administratör

  4. Muhammad Qamar Shafique says

    Hi

    I want to add 2 profiles to a blog, 1 for the author who wrote that blog and the second for the editor, who reviewed that blog. Is there any way to do so? Any plugin?

  5. Kadon Hodson says

    For the site I am trying to use this plugin on, I don’t care about showing the multiple authors somewhere on my post. In fact, I am using it on a custom post type that does not show the authors on the front-end, anyway. What I need is for two authors to have the ability to edit the post in the back-end. When I set the plugin up, only the top author is able to view or edit the post. Do I still need to change the code to make it work? Or is there some other code that needs changed?

    • WPBeginner Support says

      You would sadly need to reach out to the plugin’s support if it is not giving access to the coauthors to edit.

      Administratör

  6. santiago says

    Guys,

    im having troubles with the name displayed on the post.

    for example i have added an author filling the fields how the pluging recommend. Display name Aaaa Bbbb, name Aaaa, surname Bbbb, email etc.

    And the post display ”aaaa-bbbb” and don´t display name ”Aaaa Bbbb”.

    Im using Zeen themme. Do you know what´s happening here?

    Thanks-

    • WPBeginner Support says

      You would want to ensure that you replaced the correct tag in your theme’s files. If you reach out to your theme’s support they should be able to point you toward the correct template tag

      Administratör

  7. Cedric N says

    I found the single.php file but it contains no ”the_author_posts_link” line
    I’m using the poseidon theme
    Is the theme simply incompatible with the plugin?

    • WPBeginner Support says

      Hi Cedric,

      Your theme may be using template parts, in that case you may need to edit the template references in single.php file. Many WordPress themes use their own template_tags to display author bio, in that case you will need theme author’s help to add this.

      Administratör

  8. uday says

    Hello sir,

    I want select 2 authors by default.

    When I have add new post the me as authors selected right…but I want 2 different author selected….

  9. Antoninf says

    Hi, always wondering how can I place the co-authors’ box below the articles. Using this plugin for many time but still only for the top name. Can you help me out? Thanks.

  10. Rustyn Rose says

    I am not sure why anybody would promote this plug-in. The only real point of co-authors is for them to get public credit. A plug-in that only does the back-end and requires coding for the front-end defeats the point of a plug-in which is for people who don’t know how to do coding. That and they don’t keep it up to date anyway. How is this plug-in helpful?

    • Stacey P says

      In addition, the plugin performance has degraded since recent WP upgrades. It uses a wp_query using SQL_CALC_FOUND_ROWS, which, on large sites, causes huge processor overload. I’ve read good things about the BYLINES plugin, which has recently been acquired by the folks at PublishPress.

      But I’d love to explore other options as well to get around the problem.

  11. Waqas Ahmad says

    is there any one have idea about Genesis framework single.php file because i design my theme in Genesis framwork and there is only this code available genesis(); in single.php so how to add this code?

    if ( function_exists( ’coauthors_posts_links’ ) ) {
    coauthors_posts_links();
    } else {
    the_author_posts_link();
    }

  12. Ally says

    Hi! So I installed the plugin and added the guest authors, but I can’t quite find where to insert the code. My site is ran by WordPress, so the only place I can insert code is in ”additional CSS,” and this doesn’t seem to do anything. Any ideas?

    • WPBeginner Support says

      Hi Ally,

      If you are running a self hosted WordPress.org site, then you will find the code in single.php, content.php, or a template tag in your theme’s functions.php file. On the other hand, if you are on WordPress.com, then you cannot directly edit the theme files. Please see our comparison of WordPress.org vs WordPress.com

      Administratör

  13. John Romaine says

    Useful if you have only a few authors, but on large sites with hundreds of authors, this plugin is pretty much useless, especially if you have no idea who contributed to the post.

    I cant understand why you have to ”search” for the authors. Shouldn’t this software be smart enough to know who contributed???

  14. Joe Ferris says

    I’m using a child theme of the SuperNews theme. I’ve searched the entire theme directory for any mention of the word ’author’ and found none.

    How can I make it work if I don’t have that template tag in my theme?

  15. Svend Rugaard says

    I cant seem to get it to work – my theme is ”Premium” – but i cant seem to found what files to edit, i have put that command in functions.php –

    I can choose persons but it only show the ”original” poster on my post.

    I have try to look for those files you mention, but they doesnt exist, or i dont exactly sure what i should look for

    My Theme is ”Gauge”

  16. Umair says

    i have installed Co Authors Plus and added guest author successfully,
    after assigning post to guest author, when i click on author name, instead of showing all posts from that guest author, it redirects to main home page

  17. Jennifer says

    This plugin’s functionality should be baked into WordPress. It’s staggering that WordPress continues to tout itself as a CMS (no longer just a blog), but it has no concept of groups, or multiple authors working on a piece of content. Staggering. Good plugin though. Thanks

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.