WordPressサイトの特定のカテゴリーにしか投稿できないように投稿者を制限したいですか?
複数の投稿者がいるブログを運営している場合、投稿者の投稿先を特定のカテゴリーやサイト内の特定のセクションに限定すると便利です。
この投稿では、WordPressで投稿者を特定のカテゴリーに簡単に制限する方法を紹介します。
なぜ投稿者を特定のカテゴリーに制限するのか?
WordPressブログに複数の人が執筆している場合、適切なカテゴリーを選択できない可能性があります。
投稿者を特定のカテゴリーに制限することで、投稿者が選択できるカテゴリーを限定することができます。投稿者を1つのカテゴリーに限定して投稿させることもできます。
これは、彼らが得意とするライティングに集中できるだけでなく、誤ったカテゴリーにコンテンツが投稿されるのを防ぐこともできる。
全体として、カテゴリーを適切に使用することは、サイトのSEOランキングにも非常に有益です。
ということで、投稿者を特定のカテゴリーに制限する方法を見てみましょう。
方法1:PublishPress権限を使用して投稿者カテゴリーを制限する
この方法はより柔軟で、投稿者をカテゴリーだけでなくタグや投稿タイプにも制限する追加オプションを提供します。
まず、PublishPress Permissionsプラグインをインストールし、有効化する必要があります。詳しい手順は、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。
有効化したら、管理サイドバーから権限 ” グループのページにアクセスし、「新規追加」ボタンをクリックする必要があります。
次に、新しい権限グループの名前と説明を書く必要があります。このグループのライターはすべて、投稿できるカテゴリーが同じになります。
例えば、WordPressサイトの「チュートリアル」カテゴリーに特定のライターを限定したい場合などです。グループに覚えやすい名前を付けて、「グループを作成」ボタンをクリックしてください。
権限グループを作成したら、「グループメンバー」セクションまでスクロールダウンする必要があります。
ここから、特定のカテゴリーに限定したい投稿者名を検索ボックスに入力する必要がある。
検索結果が表示されたら、投稿者名を選択し、「選択」ボタンをクリックします。
これにより、投稿者の名前が「現在の選択」列に移動します。
次に、少し下にスクロールして、「特定の権限を設定」タブに切り替える必要があります。
ここから、「投稿タイプ」ドロップダウンメニューから「投稿」オプションを選択する必要があります。
これにより、より多くの設定が可能になる。
次に「Operation」列の「Assign Term」オプションをクリックし、「Adjustment」列の「Limit to」オプションを選択する。
その後、「資格」ドロップダウンメニューから「カテゴリー」オプションを選択する。
資格」の下の「カテゴリー」を選択すると、「カテゴリーの選択」セクションが表示されます。
ここから、投稿者を制限したい特定のカテゴリーの横にあるボックスにチェックを入れるだけです。複数のカテゴリーを選択することもできます。
次に、’Add Selected’ボタンをクリックして続けます。
権限グループの詳細が画面に表示されます。
詳細を再確認し、「権限を保存」ボタンをクリックして設定を保存することができます。
これで投稿者を特定のカテゴリーに制限することができました。
コンテンツエディターにアクセスすると、投稿者は右カラムの「カテゴリー」パネルで選択したカテゴリーだけを見ることができます。
権限グループの変更、削除、投稿者の追加・削除はいつでも可能です。
WordPressの管理サイドバーから権限 ” グループのページに行き、変更したい権限グループの下にある編集リンクをクリックするだけです。
方法2:無料のプラグインを使って投稿者カテゴリーを制限する
上記の方法があなたの求めているものでないなら、この方法をどうぞ。
まず、Restrict Author Categoriesプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法についての初心者ガイドをご覧ください。
注:Restrict Author Categoriesプラグインは、WordPressの過去3つのバージョンで更新されていません。しかし、テストしたところ問題なく動作しました。それでもわからない場合は、WordPressのプラグインが古い場合のガイドをご覧ください。
有効化したら、管理サイドバーから投稿者カテゴリの制限 ページにアクセスしてください。
そこで、「ユーザー」セクションのリストから投稿者を選ぶだけです。
投稿者を選択すると、サイトのすべてのカテゴリーが右側に表示されます。投稿者を制限したいカテゴリーにチェックを入れてください。
チェックを外したカテゴリーは、特定の投稿者のオプションとして表示されません。
選択すると、投稿者名の横のトグルが自動的に「有効化」に切り替わり、設定が保存されます。
これで、投稿者はコンテンツエディターにアクセスすると、サイドバーの「カテゴリー」パネルの下にある特定のカテゴリーだけを見ることができます。
ご覧のように、プラグインの設定により、他のカテゴリーを選択することはできません。
WordPressで投稿者を特定のカテゴリーに限定する方法についてご理解いただけたでしょうか。WordPressで会員制サイトを作成する方法や、専門家が選ぶすべてのサイトに最適なWordPressプラグインもご覧ください。
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!
Misty Rudkin says
It is useful plugin though if the category takes its children too, that’d be great.
I am trying to edit on plugin editor and use get_term_children(), is there get_term_childrean_and_parent function in WordPress?
WPBeginner Support says
For editing the plugin, you would want to reach out to the plugin’s support and they can normally assist with modifications as well as possibly integrating it into the plugin. If you only modify the plugin then you could lose customizations when the plugin updates.
管理者
Morshed Alam Suman says
The plugin is closed now.
WPBeginner Support says
Thank you for letting us know about this, we’ll be sure to look into updating the article
管理者
Yashar says
please do not promote a plugin that is banned due to security issues
WPBeginner Support says
Thank you for letting us know about this, we will be sure to look into an alternative
管理者
abay says
how to restrict the comment to author user
Felipe says
Short and useful. Thanks.
Schalk says
Is it possible to us this plugin somehow, to limit posting to a category of a custom post type?
This is the plugin I use in which i want to limit various authors to their own categories.
https://wordpress.org/plugins/scheduled-announcements-widget/
bb says
it’s wrong
Ebbin Jose says
How to restrict a role to two specific categories?
Travis Pflanz says
It looks like Restrict Categories does what you need – https://wordpress.org/plugins/restrict-categories/
WPBeginner Staff says
Apparantely, the plugin does not support this feature at the moment.
Ed says
how about the author to two or three specific cats?
Umar Hashim says
how to make published posts editable by allowed authors but need to be approved by administrator?
Custom Post Type = Employee
Employee A
Employee B
Author A assigns to Employee A Post
Author B assigns to Employee B Post
Both posts are already published (Employee A and Employee B)
Author A updates Employee A Post, nothing changed with online version but post is saved as pending review, email sent to administrator, who review changes and allow publish or discard changes.
can this be doable with Edit Flow?
WPBeginner Support says
You can create a custom user role with these capabilities see how to add or remove capabilities to user roles in WordPress.
管理者
Umar Hashim says
i have created the custom user role and i assign him edit published posts, but questions is how to make published post enable to be edited but not published again until admin review changes and allow to publish post.
like Employee A page already published and online for viewers.. Author A assigns to Employee A page.. Author A do changes to Employee A page, now changes don’t get publish but email sent to administrator that changes to Employee A page has been made by Author A.
administrator either approves changes or discard changes. on approval Employee A page online version updated for visitors.
WPBeginner Support says
If you are using the plugin we mentioned then you need to edit the user role and uncheck the Publish capability from that particular user role.
Umar Hashim says
I managed to get it in working.
i used “Capability Manager Enhanced” plugin along with “Revisionary” Plugin.
now published posts are submitted for review before going to publish online.
but now issue is we are using Custom Fields by using “Advance Custom Fields” plugin on Custom Post Type “Employee”, in Revisionary preview screen, we are not able to see those Custom Fields but only WordPress default Editor.
Is it possible to get Custom Fields Updates in Preview Comparision?