WordPressの投稿に複数の投稿者を追加したいですか?
多くのサイトでは、同じ投稿に複数の投稿者が関わっています。これらすべての共著者をクレジットすることが重要ですが、WordPressの初期設定では、ページや投稿に個別著者しか追加できません。
この投稿では、WordPressの投稿に複数の投稿者を追加する方法を紹介します。
カテゴリー:WordPressで投稿者に複数の著者(共著者)を作成する方法
WordPressの投稿に複数の投稿者を追加する最も簡単な方法は、無料のCo-Authors Plusプラグインを使用することです。
次の画像では、このプラグインによってWordPressサイトにすでに登録されているユーザーをクレジットできることがわかります。
また、Co-Author Plusにはゲスト投稿者ユーザータイプも追加され、WordPressブログにアカウントを持っていない投稿者をクレジットすることができます。
最初に行う必要があるのは、Co-Authors Plusプラグインをインストールして有効化することです。WordPressプラグインのインストール方法については、こちらをご覧ください。
プラグインを有効化したら、複数の投稿者をクレジットしたい投稿を編集するだけです。
コンテンツエディターの右側のタブで、新規’投稿者’セクションまでスクロールし、クリックして展開してください。
投稿者」タブで「投稿者を選択」フィールドをクリックし、クレジットしたい登録ユーザーの名前を入力します。適切な投稿者がドロップダウンメニューに表示されたら、その投稿者をクリックして投稿に追加します。
上記の手順で複数の投稿者を追加することができます。
初期設定では、WordPressはこれらの共著者を投稿に追加した順番に表示します。この順番を変更したい場合は、それぞれの名前の横に表示される上向きと下向きの矢印をクリックしてください。
共著者を投稿から削除したい場合は、その人の名前の次のXアイコンをクリックするだけです。
すべての共著者にクレジットを入れたら、この投稿を公開または更新することができます。投稿者の管理については、WordPressでゲストブロガーを効果的に集め、管理する方法をご覧ください。
マルチオーサーブログで複数の投稿者を表示する
WordPressのテーマによっては、このプラグインはWordPressの投稿に複数の投稿者を自動的に表示しない場合があります。つまり、テーマファイルを編集する必要があります。
これらのファイルを編集したことがない場合は、WordPressでコードをコピー&ペーストする方法をご覧ください。
テーマのコードを編集する前に、バックアップを作成するのも良いアイデアです。バックアップがあれば、万が一何か問題が発生した場合でも、WordPressサイトを素早く復元することができます。
Duplicatorを含め、無料で使えるWordPressバックアッププラグインや有料のプラグインがたくさんあります。詳しくは、WordPressサイトのバックアップ方法をご覧ください。
バックアップを作成したら、投稿者名を表示するためのコードを編集する必要があります。
このコードは通常the_author()関数かthe_author_posts_link()関数である。
テーマによっては、この関数はテーマのsingle.php、content.php、またはfunctions.phpファイルにあるかもしれません。詳しくは、WordPressで編集するテーマファイルの見つけ方をご覧ください。
これらの関数を見つけたら、それを以下のスニペットに置き換える必要がある:
if ( function_exists( 'coauthors_posts_links' ) ) {
coauthors_posts_links();
} else {
the_author_posts_link();
}
人気のOceanWPテーマを使って、マルチオーサー・ブログを作成する方法を見てみよう。
このテーマのfunctions.phpファイルを開くと、the_author_posts_link関数があります:
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;
}
WordPressで複数の投稿者を表示するには、この部分を以下のコード・スニペットで置き換えればよい:
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;
}
このコードを追加したら、画面を一番下までスクロールする。
その後、「ファイルを更新」ボタンをクリックしてください。
これで、あなたのサイトにアクセスすると、WordPressの投稿日に複数の投稿者がクレジットされていることがわかります。
別の方法サイトが壊れてしまう可能性のあるテーマファイルを編集する代わりに、WPCodeプラグインを使って上記のコードを安全に追加することができます。ステップバイステップの手順については、WordPressでカスタムコードを簡単に追加する方法のチュートリアルを参照してください。
マルチオーサーWordPressブログにゲスト投稿者を追加する
Co-Authors Plusプラグインは、マルチオーサーWordPressブログの登録ユーザーを検索して表示することができます。
しかし、あなたのサイトにすでにアカウントを持っていないゲスト投稿者をクレジットしたい場合はどうすればいいでしょうか?
投稿者用のアカウントを作成することもできるが、これは必ずしも安全な設定ではない。
WordPressにはユーザー権限グループがあるとはいえ、誰かに管理エリアへのアクセスやサイトへの書き込み権限を与えることは常にリスクとなります。サイトを保護する方法の詳細については、究極のWordPressセキュリティガイドをご覧ください。
このことを念頭に置いて、Co-Authors Plusを使ってゲスト投稿者を作成することができます。そうすれば、WordPressの管理エリアにアクセスすることなく、個別投稿に複数のゲスト著者をクレジットすることができます。
ゲスト投稿者を作成するには、ユーザー ” ゲスト投稿者にアクセスしてください。ここから「新規追加」をクリックします。
次の画面で、この投稿者の情報をすべて「Add New Guest Author」フォームに入力する必要があります。
投稿者のアバターとなる画像をアップロードすることもできます。あなたのテーマがアバターをサポートしている限り、この画像はサイト上で作者の名前と一緒に表示されます。
アバターをアップロードしない場合、WordPressはゲスト投稿者のメールアドレスにリンクされているGravatarを探します。詳しくは、WordPressの初期設定Gravatarを変更する方法をご覧ください。
これらの情報をすべて入力したら、「新規投稿者を追加」ボタンをクリックしてください。
WordPressはこの人をゲスト投稿者として作成します。共著者としてクレジットするには、上記と同じプロセスを踏むだけです。
WordPressで投稿者に複数の著者(共著者)を追加する方法について、この投稿がお役に立てれば幸いです。次に、WordPressでオンラインブログでお金を稼ぐ方法についてのガイドをご覧いただくか、WordPressのSEOプラグインとツールの中からエキスパートが選ぶ、使うべきものをご覧ください。
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.
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!
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?
WPBeginner Support says
For the moment ours is a custom snippet.
管理者
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.
管理者
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?
WPBeginner Support says
Unless we’re misunderstanding, you can use the method from this article
管理者
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.
管理者
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
管理者
sumit says
Hi Techies,
So to get both author in posts you have to customize single.php
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.
管理者
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….
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.
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.
Cedric N says
Are there any alternative plugins though?
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();
}
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
管理者
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???
saad says
Hi this is great plugin but can we show on which date we added the new author
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?
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”
WPBeginner Support says
Hey Svend,
Please contact your theme’s support they will be able to tell you which files you need to edit.
管理者
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
Fahad Ur Rehman Khan says
This is a great tutorial!
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
Matus says
Could you please make a tutorial on how to use, create and embed dynamic favicons?