{"id":25247,"date":"2021-03-01T07:00:00","date_gmt":"2021-03-01T14:00:00","guid":{"rendered":"https:\/\/memberpress.com\/?p=25247"},"modified":"2022-11-16T15:15:58","modified_gmt":"2022-11-16T22:15:58","slug":"roles-based-content-protection-memberpress","status":"publish","type":"post","link":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/","title":{"rendered":"Comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s avec MemberPress"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Un site d'adh\u00e9sion vous permet d'autoriser l'acc\u00e8s au contenu en fonction du niveau d'adh\u00e9sion. Par exemple, une adh\u00e9sion de niveau bronze peut donner acc\u00e8s \u00e0 un article approfondi, tandis qu'une adh\u00e9sion de niveau or inclut \u00e9galement une s\u00e9rie de vid\u00e9os sur le sujet. <\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-6a77035406a82\" class=\"ez-toc-cssicon-toggle-label\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">CE QU'IL Y A \u00c0 L'INT\u00c9RIEUR<\/p>\n<span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #000000;color:#000000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #000000;color:#000000\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a77035406a82\"  \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#An_Introduction_to_WordPress_Roles_and_Capabilities\" >Introduction aux r\u00f4les et capacit\u00e9s de WordPress<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#How_to_Protect_Content_Based_on_Roles_and_Capabilities_with_MemberPress_2_Methods\" >Comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s avec MemberPress (2 m\u00e9thodes)<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#Method_1_Protect_Content_Based_on_a_Role\" >M\u00e9thode 1 Prot\u00e9ger le contenu en fonction d'un r\u00f4le<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#Method_2_Restrict_Content_Based_on_a_Capability\" >M\u00e9thode 2 Restreindre le contenu sur la base d'une capacit\u00e9<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<p class=\"wp-block-paragraph\">Mais qu'en est-il si vous souhaitez prot\u00e9ger le contenu sur la base d'autres crit\u00e8res ?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cela peut s'av\u00e9rer particuli\u00e8rement utile si vous utilisez des int\u00e9grations tierces sur votre site web. Gr\u00e2ce \u00e0 <a href=\"https:\/\/memberpress.com\/fr\/\" target=\"_blank\" rel=\"noreferrer noopener\">MemberPress<\/a> Gr\u00e2ce aux r\u00e8gles relatives aux r\u00f4les et aux capacit\u00e9s, vous avez davantage de contr\u00f4le sur votre contenu. En quelques clics, vous pouvez restreindre l'acc\u00e8s \u00e0 n'importe quel \u00e9l\u00e9ment en fonction des param\u00e8tres que vous avez choisis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dans cet article, nous allons vous expliquer comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s avec MemberPress. Nous expliquerons \u00e9galement ce que sont les r\u00f4les et les capacit\u00e9s, et nous aborderons quelques raisons pour lesquelles vous pourriez vouloir utiliser cette fonctionnalit\u00e9. C'est parti !<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"An_Introduction_to_WordPress_Roles_and_Capabilities\"><\/span>Introduction aux r\u00f4les et capacit\u00e9s de WordPress<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities.jpg\"><img decoding=\"async\" width=\"1024\" height=\"447\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities-1024x447.jpg\" alt=\"R\u00f4les et capacit\u00e9s de WordPress\" class=\"wp-image-25944\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities-1024x447.jpg 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities-300x131.jpg 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities-768x335.jpg 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities-1536x670.jpg 1536w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities.jpg 1583w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Les r\u00f4les et les capacit\u00e9s de WordPress tels qu'ils sont visualis\u00e9s \u00e0 l'aide de l'application gratuite <a href=\"https:\/\/wordpress.org\/plugins\/user-roles-and-capabilities\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Plugin R\u00f4les et capacit\u00e9s des utilisateurs<\/a><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/developer.wordpress.org\/plugins\/users\/roles-and-capabilities\/\" target=\"_blank\" rel=\"noreferrer noopener\">R\u00f4les et capacit\u00e9s<\/a> sont int\u00e9gr\u00e9s \u00e0 WordPress et vous permettent de contr\u00f4ler les privil\u00e8ges des utilisateurs. Si vous utilisez WordPress depuis un certain temps, vous \u00eates probablement familier avec ses r\u00f4les par d\u00e9faut. Il s'agit des r\u00f4les suivants <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Administrateur :<\/strong> Les autorisations sont illimit\u00e9es, y compris pour l'installation et l'activation de plugins et de th\u00e8mes.<\/li><li><strong>R\u00e9dacteur en chef :<\/strong> Ils peuvent apporter des modifications \u00e0 leurs propres messages et \u00e0 ceux des autres utilisateurs.<\/li><li><strong>Auteur :<\/strong> est capable de r\u00e9diger et de publier ses propres messages.<\/li><li><strong>Contributeur :<\/strong> Peuvent \u00e9crire (mais pas publier) leurs propres messages.<\/li><li><strong>Abonn\u00e9 :<\/strong> N'est autoris\u00e9 qu'\u00e0 lire les messages.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Les r\u00f4les fonctionnent selon une hi\u00e9rarchie. Un abonn\u00e9 dispose du moins de privil\u00e8ges et de l'acc\u00e8s le plus limit\u00e9. Chaque niveau successif dispose des capacit\u00e9s du r\u00f4le inf\u00e9rieur, ainsi que de privil\u00e8ges et d'un acc\u00e8s suppl\u00e9mentaires. L'administrateur de WordPress dispose de tous les privil\u00e8ges et d'un acc\u00e8s complet. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Vous pouvez utiliser ces r\u00f4les WordPress pour contr\u00f4ler l'acc\u00e8s au contenu de votre site d'adh\u00e9sion MemberPress :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles.png\"><img decoding=\"async\" width=\"1024\" height=\"228\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-1024x228.png\" alt=\"d\u00e9finition des r\u00f4les et des capacit\u00e9s dans wordpress\" class=\"wp-image-25255\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-1024x228.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-300x67.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-768x171.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-1536x342.png 1536w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-2048x455.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Une capacit\u00e9 WordPress est une t\u00e2che qu'un utilisateur peut effectuer. Les capacit\u00e9s sont cach\u00e9es dans WordPress et fonctionnent en fonction des r\u00f4les auxquels elles sont rattach\u00e9es. Elles comprennent des op\u00e9rations telles que la modification d'un article, l'ajout d'une page ou la suppression d'un utilisateur.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bien que de nombreux propri\u00e9taires de sites d'adh\u00e9sion <a href=\"https:\/\/memberpress.com\/fr\/docs\/rules-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">prot\u00e9ger le contenu en fonction de l'appartenance<\/a>Cependant, dans certains cas, vous voudrez peut-\u00eatre le prot\u00e9ger en fonction des r\u00f4les ou des capacit\u00e9s de WordPress. Par exemple :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Un plugin tiers peut cr\u00e9er automatiquement des r\u00f4les WordPress suppl\u00e9mentaires pour lesquels vous souhaitez accorder un acc\u00e8s sp\u00e9cifique. <\/li><li>Tous les utilisateurs ayant la possibilit\u00e9 de modifier des messages peuvent avoir besoin d'acc\u00e9der \u00e0 une page contenant des informations confidentielles ou exclusives.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Gr\u00e2ce \u00e0 la fonction R\u00e8gles MemberPress, vous pouvez facilement prot\u00e9ger n'importe quel contenu de votre site en utilisant les param\u00e8tres les plus appropri\u00e9s \u00e0 la situation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Protect_Content_Based_on_Roles_and_Capabilities_with_MemberPress_2_Methods\"><\/span>Comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s avec MemberPress (2 m\u00e9thodes)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Dans la plupart des cas, vous prot\u00e9gerez le contenu de votre site en fonction de la d\u00e9signation des membres. Toutefois, si vous jugez n\u00e9cessaire de prot\u00e9ger le contenu en fonction des r\u00f4les ou des capacit\u00e9s, MemberPress vous offre la souplesse n\u00e9cessaire. Voici comment proc\u00e9der.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_1_Protect_Content_Based_on_a_Role\"><\/span>M\u00e9thode 1 : Prot\u00e9ger le contenu en fonction d'un r\u00f4le<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Si vous ne l'avez pas encore fait, cr\u00e9ez le contenu que vous souhaitez prot\u00e9ger.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ensuite, \u00e0 partir de votre tableau de bord WordPress, allez sur <em>MemberPress<\/em> > <em>R\u00e8gles &gt; Ajouter une nouvelle r\u00e8gle<\/em>:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules.png\"><img decoding=\"async\" width=\"1024\" height=\"569\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-1024x569.png\" alt=\"Capture d&#039;\u00e9cran du tableau de bord de MemberPress\" class=\"wp-image-25248\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-1024x569.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-300x167.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-768x427.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Sous <em>Contenu prot\u00e9g\u00e9<\/em>s\u00e9lectionnez le message ou la page que vous souhaitez prot\u00e9ger. Dans la fen\u00eatre <em>Conditions d'acc\u00e8s<\/em> s\u00e9lectionner <em>R\u00f4le<\/em>: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select.png\"><img decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select-1024x389.png\" alt=\"Capture d&#039;\u00e9cran de l&#039;administration de MemberPress - Options de r\u00e8gles.\" class=\"wp-image-25249\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select-1024x389.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select-300x114.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select-768x292.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Une fois que vous l'avez fait, un menu d\u00e9roulant appara\u00eet \u00e0 droite. Dans ce menu, s\u00e9lectionnez le r\u00f4le sp\u00e9cifique auquel vous souhaitez autoriser l'acc\u00e8s :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles.png\"><img decoding=\"async\" width=\"1024\" height=\"388\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-1024x388.png\" alt=\"Capture d&#039;\u00e9cran de l&#039;administrateur de MemberPress - option R\u00e8gles s\u00e9lectionn\u00e9e : \u00c9diteur.\" class=\"wp-image-25250\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-1024x388.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-300x114.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-768x291.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Si vous avez des plugins tiers qui cr\u00e9ent automatiquement des r\u00f4les WordPress, vous remarquerez qu'ils sont list\u00e9s ici en plus des r\u00f4les WordPress par d\u00e9faut d'administrateur, d'\u00e9diteur, d'auteur, de contributeur et d'abonn\u00e9.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Par exemple, <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce<\/a> ajoute les r\u00f4les de client et de responsable de boutique \u00e0 WordPress. Si vous voulez cr\u00e9er du contenu et le rendre visible uniquement aux personnes qui ont achet\u00e9 des produits chez vous, vous pouvez utiliser une r\u00e8gle bas\u00e9e sur les r\u00f4les pour le faire.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Vous pouvez \u00e9galement ajouter des r\u00e8gles suppl\u00e9mentaires \u00e0 n'importe quel \u00e9l\u00e9ment de contenu en s\u00e9lectionnant le bouton <em>Plus<\/em> (+) sous l'ic\u00f4ne <em>Conditions d'acc\u00e8s<\/em>. Cela vous permet de personnaliser compl\u00e8tement vos autorisations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_2_Restrict_Content_Based_on_a_Capability\"><\/span>M\u00e9thode 2 : Restreindre le contenu sur la base d'une capacit\u00e9<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Cr\u00e9ez le contenu que vous souhaitez prot\u00e9ger, puis cliquez sur <em>MemberPress<\/em> > <em>R\u00e8gles &gt;<\/em> <em>Ajouter un nouveau<\/em> comme nous l'avons d\u00e9crit plus haut. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sous <em>Contenu prot\u00e9g\u00e9<\/em>s\u00e9lectionnez le contenu que vous souhaitez prot\u00e9ger. Aller \u00e0 <em>Conditions d'acc\u00e8s<\/em> et s\u00e9lectionnez <em>Capacit\u00e9s<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select.png\"><img decoding=\"async\" width=\"1024\" height=\"387\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select-1024x387.png\" alt=\"Capture d&#039;\u00e9cran de l&#039;administration de MemberPress - Options de capacit\u00e9s.\" class=\"wp-image-25251\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select-1024x387.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select-300x113.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select-768x290.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Dans le champ qui appara\u00eet \u00e0 droite, saisissez la fonction de la capacit\u00e9 \u00e0 laquelle vous souhaitez accorder l'acc\u00e8s. Tout utilisateur poss\u00e9dant cette capacit\u00e9 sera autoris\u00e9 \u00e0 acc\u00e9der au contenu :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities.png\"><img decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-1024x552.png\" alt=\"Capture d&#039;\u00e9cran de l&#039;administrateur de MemberPress - Option de capacit\u00e9s saisie : edit_posts.\" class=\"wp-image-25252\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-1024x552.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-300x162.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-768x414.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Vous trouverez une liste des fonctions de capacit\u00e9 par d\u00e9faut dans la rubrique <a href=\"https:\/\/wordpress.org\/support\/article\/roles-and-capabilities\/#capabilities\" target=\"_blank\" rel=\"noreferrer noopener\">Codex WordPress<\/a>. Pour cr\u00e9er une r\u00e8gle bas\u00e9e sur les capacit\u00e9s, vous devez saisir le nom de la capacit\u00e9 dans le m\u00eame format que celui indiqu\u00e9 dans le Codex de WordPress :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities.png\"><img decoding=\"async\" width=\"1024\" height=\"495\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities-1024x495.png\" alt=\"wordpress codex screenshot\" class=\"wp-image-25253\" srcset=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities-1024x495.png 1024w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities-300x145.png 300w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities-768x371.png 768w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities-1536x742.png 1536w, https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities.png 1580w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Vous pouvez ajouter des r\u00e8gles suppl\u00e9mentaires \u00e0 n'importe quel \u00e9l\u00e9ment de contenu en s\u00e9lectionnant le bouton <em>Plus<\/em> (+) sous l'ic\u00f4ne <em>Conditions d'acc\u00e8s<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">En r\u00e8gle g\u00e9n\u00e9rale, vous prot\u00e9gerez le contenu de votre site web d'adh\u00e9sion en fonction des niveaux d'adh\u00e9sion. Cependant, dans certains cas, il peut \u00eatre utile de prot\u00e9ger le contenu en fonction d'un r\u00f4le ou d'une capacit\u00e9 WordPress. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/memberpress.com\/fr\/\" target=\"_blank\" rel=\"noreferrer noopener\">MemberPress<\/a> vous offre la flexibilit\u00e9 et la libert\u00e9 de cr\u00e9er ces r\u00e8gles et de contr\u00f4ler votre contenu de la mani\u00e8re la plus judicieuse pour votre site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dans cet article, nous avons abord\u00e9 la question des r\u00e8gles relatives aux r\u00f4les et aux capacit\u00e9s de MemberPress. Nous avons \u00e9voqu\u00e9 quelques raisons pour lesquelles vous pourriez vouloir utiliser ces options et nous vous avons montr\u00e9 comment ajouter ces r\u00e8gles en quelques \u00e9tapes simples.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Avez-vous des questions sur la protection de votre contenu en fonction des r\u00f4les ou des capacit\u00e9s ? N'h\u00e9sitez pas \u00e0 nous en faire part dans la section des commentaires ci-dessous !<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Si vous avez aim\u00e9 cet article, n'oubliez pas de nous suivre sur <a href=\"https:\/\/www.facebook.com\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">Facebook<\/a>, <a href=\"https:\/\/twitter.com\/memberpress\" rel=\"noreferrer noopener\" target=\"_blank\">Twitter<\/a>, <a href=\"https:\/\/www.instagram.com\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">Instagram<\/a>et <a href=\"https:\/\/www.linkedin.com\/showcase\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">LinkedIn<\/a>!<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>A membership site offers you the ability to allow access to content based on membership level. For instance, a bronze level membership may provide access to an in-depth article, while a gold membership includes a video series on the topic as well. But, what if you want to protect content based on other criteria? This [\u2026]<\/p>\n","protected":false},"author":76756,"featured_media":25454,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_strive_editorial_status":"not-started","_strive_copy_of":0,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_FSMCFIC_featured_image_caption":"","_FSMCFIC_featured_image_nocaption":"","_FSMCFIC_featured_image_hide":"","_strive_checklists":"\"\"","_strive_active_checklist":"62291e2bb2422","_strive_post_notes":"","footnotes":""},"categories":[120,134],"tags":[812,609],"class_list":["post-25247","post","type-post","status-publish","format-standard","has-post-thumbnail","category-content","category-how-to-2","tag-content-protection","tag-roles-and-capabilities","entry"],"acf":{"plans":["scale"],"is_featured":false,"download_source":"none","mothership_slug":"","download_url":""},"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.6.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"Knowing how to protect content based on roles and capabilities in WordPress gives you flexibility. In this article, we&#039;ll show you how to set it up!\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Zeph Bluestone\"\/>\n\t<meta name=\"keywords\" content=\"content protection,roles and capabilities\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.6.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"fr_FR\" \/>\n\t\t<meta property=\"og:site_name\" content=\"MemberPress\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to Protect Content Based on Roles and Capabilities with MemberPress\" \/>\n\t\t<meta property=\"og:description\" content=\"Knowing how to protect content based on roles and capabilities in WordPress gives you flexibility. In this article, we&#039;ll show you how to set it up!\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/roles-and-capabilities-1.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/roles-and-capabilities-1.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t\t<meta property=\"og:image:height\" content=\"873\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-03-01T14:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-11-16T22:15:58+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/memberpress\/\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@memberpress\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to Protect Content Based on Roles and Capabilities with MemberPress\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Knowing how to protect content based on roles and capabilities in WordPress gives you flexibility. In this article, we&#039;ll show you how to set it up!\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/roles-and-capabilities-1.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#blogposting\",\"name\":\"How to Protect Content Based on Roles and Capabilities with MemberPress\",\"headline\":\"How to Protect Content Based on Roles and Capabilities with MemberPress\",\"author\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/author\\\/staff-writer\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/roles-and-capabilities-1.jpg\",\"width\":1024,\"height\":873,\"caption\":\"roles and capabilities\"},\"datePublished\":\"2021-03-01T07:00:00-05:00\",\"dateModified\":\"2022-11-16T15:15:58-05:00\",\"inLanguage\":\"fr-FR\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#webpage\"},\"articleSection\":\"Content, How To, content protection, roles and capabilities\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/memberpress.com\\\/fr\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/category\\\/membership-site\\\/#listItem\",\"name\":\"Membership Site\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/category\\\/membership-site\\\/#listItem\",\"position\":2,\"name\":\"Membership Site\",\"item\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/category\\\/membership-site\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/category\\\/membership-site\\\/content\\\/#listItem\",\"name\":\"Content\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/category\\\/membership-site\\\/content\\\/#listItem\",\"position\":3,\"name\":\"Content\",\"item\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/category\\\/membership-site\\\/content\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#listItem\",\"name\":\"How to Protect Content Based on Roles and Capabilities with MemberPress\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/category\\\/membership-site\\\/#listItem\",\"name\":\"Membership Site\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#listItem\",\"position\":4,\"name\":\"How to Protect Content Based on Roles and Capabilities with MemberPress\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/category\\\/membership-site\\\/content\\\/#listItem\",\"name\":\"Content\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/#organization\",\"name\":\"MemberPress\",\"description\":\"The All-In-One WordPress Membership Plugin\",\"url\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/mp-icon-RGB_Icon-01.jpg\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#organizationLogo\",\"width\":1650,\"height\":1275,\"caption\":\"memberpress logo icon\"},\"image\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.instagram.com\\\/memberpress\\\/\",\"https:\\\/\\\/www.pinterest.com\\\/memberpressplugin\\\/\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/MemberPressPlugin\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/memberpress\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/author\\\/staff-writer\\\/#author\",\"url\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/author\\\/staff-writer\\\/\",\"name\":\"Zeph Bluestone\",\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e1c9e7d7b492bb1e583580325b42f8d0.jpg?ver=1786029628\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#webpage\",\"url\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/\",\"name\":\"How to Protect Content Based on Roles and Capabilities with MemberPress\",\"description\":\"Knowing how to protect content based on roles and capabilities in WordPress gives you flexibility. In this article, we'll show you how to set it up!\",\"inLanguage\":\"fr-FR\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/author\\\/staff-writer\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/author\\\/staff-writer\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/roles-and-capabilities-1.jpg\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#mainImage\",\"width\":1024,\"height\":873,\"caption\":\"roles and capabilities\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/blog\\\/roles-based-content-protection-memberpress\\\/#mainImage\"},\"datePublished\":\"2021-03-01T07:00:00-05:00\",\"dateModified\":\"2022-11-16T15:15:58-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/\",\"name\":\"MemberPress\",\"description\":\"The All-In-One WordPress Membership Plugin\",\"inLanguage\":\"fr-FR\",\"publisher\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/fr\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>How to Protect Content Based on Roles and Capabilities with MemberPress<\/title>\n\n","aioseo_head_json":{"title":"Comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s avec MemberPress","description":"Savoir comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s dans WordPress vous donne de la flexibilit\u00e9. Dans cet article, nous allons vous montrer comment le mettre en place !","canonical_url":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/","robots":"max-image-preview:large","keywords":"content protection,roles and capabilities","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#blogposting","name":"How to Protect Content Based on Roles and Capabilities with MemberPress","headline":"How to Protect Content Based on Roles and Capabilities with MemberPress","author":{"@id":"https:\/\/memberpress.com\/fr\/blog\/author\/staff-writer\/#author"},"publisher":{"@id":"https:\/\/memberpress.com\/fr\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/roles-and-capabilities-1.jpg","width":1024,"height":873,"caption":"roles and capabilities"},"datePublished":"2021-03-01T07:00:00-05:00","dateModified":"2022-11-16T15:15:58-05:00","inLanguage":"fr-FR","mainEntityOfPage":{"@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#webpage"},"isPartOf":{"@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#webpage"},"articleSection":"Content, How To, content protection, roles and capabilities"},{"@type":"BreadcrumbList","@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr#listItem","position":1,"name":"Home","item":"https:\/\/memberpress.com\/fr","nextItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/#listItem","name":"Membership Site"}},{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/#listItem","position":2,"name":"Membership Site","item":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/","nextItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/content\/#listItem","name":"Content"},"previousItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/content\/#listItem","position":3,"name":"Content","item":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/content\/","nextItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#listItem","name":"How to Protect Content Based on Roles and Capabilities with MemberPress"},"previousItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/#listItem","name":"Membership Site"}},{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#listItem","position":4,"name":"How to Protect Content Based on Roles and Capabilities with MemberPress","previousItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/content\/#listItem","name":"Content"}}]},{"@type":"Organization","@id":"https:\/\/memberpress.com\/fr\/#organization","name":"MemberPress","description":"The All-In-One WordPress Membership Plugin","url":"https:\/\/memberpress.com\/fr\/","logo":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg","@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#organizationLogo","width":1650,"height":1275,"caption":"memberpress logo icon"},"image":{"@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#organizationLogo"},"sameAs":["https:\/\/www.instagram.com\/memberpress\/","https:\/\/www.pinterest.com\/memberpressplugin\/","https:\/\/www.youtube.com\/c\/MemberPressPlugin","https:\/\/www.linkedin.com\/company\/memberpress\/"]},{"@type":"Person","@id":"https:\/\/memberpress.com\/fr\/blog\/author\/staff-writer\/#author","url":"https:\/\/memberpress.com\/fr\/blog\/author\/staff-writer\/","name":"Zeph Bluestone","image":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/litespeed\/avatar\/e1c9e7d7b492bb1e583580325b42f8d0.jpg?ver=1786029628"}},{"@type":"WebPage","@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#webpage","url":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/","name":"How to Protect Content Based on Roles and Capabilities with MemberPress","description":"Knowing how to protect content based on roles and capabilities in WordPress gives you flexibility. In this article, we'll show you how to set it up!","inLanguage":"fr-FR","isPartOf":{"@id":"https:\/\/memberpress.com\/fr\/#website"},"breadcrumb":{"@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#breadcrumblist"},"author":{"@id":"https:\/\/memberpress.com\/fr\/blog\/author\/staff-writer\/#author"},"creator":{"@id":"https:\/\/memberpress.com\/fr\/blog\/author\/staff-writer\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/roles-and-capabilities-1.jpg","@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#mainImage","width":1024,"height":873,"caption":"roles and capabilities"},"primaryImageOfPage":{"@id":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/#mainImage"},"datePublished":"2021-03-01T07:00:00-05:00","dateModified":"2022-11-16T15:15:58-05:00"},{"@type":"WebSite","@id":"https:\/\/memberpress.com\/fr\/#website","url":"https:\/\/memberpress.com\/fr\/","name":"MemberPress","description":"The All-In-One WordPress Membership Plugin","inLanguage":"fr-FR","publisher":{"@id":"https:\/\/memberpress.com\/fr\/#organization"}}]},"og:locale":"fr_FR","og:site_name":"MemberPress","og:type":"article","og:title":"How to Protect Content Based on Roles and Capabilities with MemberPress","og:description":"Knowing how to protect content based on roles and capabilities in WordPress gives you flexibility. In this article, we'll show you how to set it up!","og:url":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/","og:image":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/roles-and-capabilities-1.jpg","og:image:secure_url":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/roles-and-capabilities-1.jpg","og:image:width":1024,"og:image:height":873,"article:published_time":"2021-03-01T14:00:00+00:00","article:modified_time":"2022-11-16T22:15:58+00:00","article:publisher":"https:\/\/www.facebook.com\/memberpress\/","twitter:card":"summary_large_image","twitter:site":"@memberpress","twitter:title":"How to Protect Content Based on Roles and Capabilities with MemberPress","twitter:description":"Knowing how to protect content based on roles and capabilities in WordPress gives you flexibility. In this article, we'll show you how to set it up!","twitter:image":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/roles-and-capabilities-1.jpg"},"aioseo_meta_data":{"post_id":"25247","title":"Comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s avec MemberPress","description":"Savoir comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s dans WordPress vous donne de la flexibilit\u00e9. Dans cet article, nous allons vous montrer comment le mettre en place !","keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"none","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"},\"book\":[],\"event\":[],\"jobPosting\":[],\"music\":[],\"person\":[],\"restaurant\":[],\"service\":[],\"video\":[]}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"seo_analyzer_scan_date":"2025-10-09 18:46:02","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"open_ai":null,"ai":null,"created":"2021-01-07 01:52:10","updated":"2026-03-03 15:04:54"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/memberpress.com\/fr\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/\" title=\"Membership Site\">Membership Site<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/content\/\" title=\"Content\">Content<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tHow to Protect Content Based on Roles and Capabilities with MemberPress\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/memberpress.com\/fr"},{"label":"Membership Site","link":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/"},{"label":"Content","link":"https:\/\/memberpress.com\/fr\/blog\/category\/membership-site\/content\/"},{"label":"How to Protect Content Based on Roles and Capabilities with MemberPress","link":"https:\/\/memberpress.com\/fr\/blog\/roles-based-content-protection-memberpress\/"}],"app_bookmark":{"bookmark_id":0,"is_bookmarked":false,"bookmark_date":0},"comments_count":"0","content_native":[{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">A membership site offers you the ability to allow access to content based on membership level. For instance, a bronze level membership may provide access to an in-depth article, while a gold membership includes a video series on the topic as well. <\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">A membership site offers you the ability to allow access to content based on membership level. For instance, a bronze level membership may provide access to an in-depth article, while a gold membership includes a video series on the topic as well. <\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">But, what if you want to protect content based on other criteria?<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">But, what if you want to protect content based on other criteria?<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">This may be especially helpful if you\u2019re using third-party integrations with your website. Thanks to <a href=\"https:\/\/memberpress.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">MemberPress<\/a> roles and capabilities rules, you have more control over your content. You can restrict access to any piece based on your chosen parameters with just a few clicks.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">This may be especially helpful if you\u2019re using third-party integrations with your website. Thanks to <a href=\"https:\/\/memberpress.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">MemberPress<\/a> roles and capabilities rules, you have more control over your content. You can restrict access to any piece based on your chosen parameters with just a few clicks.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">In this article, we\u2019ll walk you through how to protect content based on roles and capabilities with MemberPress. We\u2019ll also explain what roles and capabilities are, and cover a few reasons why you may want to use this feature. Let\u2019s get to it!<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">In this article, we\u2019ll walk you through how to protect content based on roles and capabilities with MemberPress. We\u2019ll also explain what roles and capabilities are, and cover a few reasons why you may want to use this feature. Let\u2019s get to it!<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h2 class=\"wp-block-heading\">An Introduction to WordPress Roles and Capabilities<\/h2>","content":"Introduction aux r\u00f4les et capacit\u00e9s de WordPress","data":[],"style":{"align":"left","parent_style":{},"header":"h2","fontSize":"27px"}},{"type":"core\/image","render":"<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities.jpg\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities-1024x447.jpg\" alt=\"WordPress roles and capabilities\" class=\"wp-image-25944\"\/><\/a><figcaption>WordPress roles and capabilities as viewed using the free <a href=\"https:\/\/wordpress.org\/plugins\/user-roles-and-capabilities\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">User Roles &amp; Capabilities plugin<\/a><\/figcaption><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities-1024x447.jpg","data":{"linkSrc":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities.jpg","alt":"WordPress roles and capabilities","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/02\/wordpress-roles-capabilities-1024x447.jpg","caption":"WordPress roles and capabilities as viewed using the free <a href=\"https:\/\/wordpress.org\/plugins\/user-roles-and-capabilities\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">User Roles &amp; Capabilities plugin<\/a>","targetBlank":true,"linkDestination":"media"},"style":{"width":1024,"height":447,"align":"left","parent_style":{},"sizeSlug":"large"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\"><a href=\"https:\/\/developer.wordpress.org\/plugins\/users\/roles-and-capabilities\/\" target=\"_blank\" rel=\"noreferrer noopener\">Roles and capabilities<\/a> are built into WordPress and enable you to control users' privileges. If you\u2019ve used WordPress for any amount of time, you\u2019re probably familiar with its default roles. These include: <\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\"><a href=\"https:\/\/developer.wordpress.org\/plugins\/users\/roles-and-capabilities\/\" target=\"_blank\" rel=\"noreferrer noopener\">Roles and capabilities<\/a> are built into WordPress and enable you to control users' privileges. If you\u2019ve used WordPress for any amount of time, you\u2019re probably familiar with its default roles. These include: <\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/list","render":"<ul class=\"wp-block-list\"><li><strong>Administrator:<\/strong> Has unlimited permissions, including installing and activating plugins and themes.<\/li><li><strong>Editor:<\/strong> Can make changes to their own posts, and those of other users.<\/li><li><strong>Author:<\/strong> Is able to write and publish their own posts.<\/li><li><strong>Contributor:<\/strong> Can write (but not publish) their own posts.<\/li><li><strong>Subscriber:<\/strong> Only has permission to read posts.<\/li><\/ul>","content":"<ul class=\"wp-block-list\"><li><strong>Administrateur :<\/strong> Les autorisations sont illimit\u00e9es, y compris pour l'installation et l'activation de plugins et de th\u00e8mes.<\/li><li><strong>R\u00e9dacteur en chef :<\/strong> Ils peuvent apporter des modifications \u00e0 leurs propres messages et \u00e0 ceux des autres utilisateurs.<\/li><li><strong>Auteur :<\/strong> est capable de r\u00e9diger et de publier ses propres messages.<\/li><li><strong>Contributeur :<\/strong> Peuvent \u00e9crire (mais pas publier) leurs propres messages.<\/li><li><strong>Abonn\u00e9 :<\/strong> N'est autoris\u00e9 qu'\u00e0 lire les messages.<\/li><\/ul>","data":{"listType":"unordered"},"style":{"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Roles operate as a hierarchy. A Subscriber has the least amount of privileges and the most limited access. Each successive level has the capabilities of the role beneath it, plus additional privileges and access. A WordPress Administrator has full privileges and access. <\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Roles operate as a hierarchy. A Subscriber has the least amount of privileges and the most limited access. Each successive level has the capabilities of the role beneath it, plus additional privileges and access. A WordPress Administrator has full privileges and access. <\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">You can use these WordPress roles to control access to content on your MemberPress membership site:<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">You can use these WordPress roles to control access to content on your MemberPress membership site:<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles.png\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-1024x228.png\" alt=\"setting roles and capabilities in wordpress\" class=\"wp-image-25255\"\/><\/a><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-1024x228.png","data":{"linkSrc":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles.png","alt":"setting roles and capabilities in wordpress","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wp-user-roles-1024x228.png","linkDestination":"media"},"style":{"width":1024,"height":228,"align":"left","parent_style":{},"sizeSlug":"large"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">A WordPress capability is a task that a user can perform. Capabilities are hidden in WordPress and operate based on the roles they\u2019re attached to. They include operations such as edit a post, add a page, or delete a user.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">A WordPress capability is a task that a user can perform. Capabilities are hidden in WordPress and operate based on the roles they\u2019re attached to. They include operations such as edit a post, add a page, or delete a user.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Although many membership site owners <a href=\"https:\/\/memberpress.com\/docs\/rules-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">protect content based on membership<\/a>, there may be instances where you want to protect it based on WordPress roles or capabilities instead. For example:<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Although many membership site owners <a href=\"https:\/\/memberpress.com\/docs\/rules-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">protect content based on membership<\/a>, there may be instances where you want to protect it based on WordPress roles or capabilities instead. For example:<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/list","render":"<ul class=\"wp-block-list\"><li>A third-party plugin may automatically create additional WordPress roles for which you\u2019d like to grant specific access. <\/li><li>All users with the capability to edit posts might need access to a page with confidential or proprietary information.<\/li><\/ul>","content":"<ul class=\"wp-block-list\"><li>Un plugin tiers peut cr\u00e9er automatiquement des r\u00f4les WordPress suppl\u00e9mentaires pour lesquels vous souhaitez accorder un acc\u00e8s sp\u00e9cifique. <\/li><li>Tous les utilisateurs ayant la possibilit\u00e9 de modifier des messages peuvent avoir besoin d'acc\u00e9der \u00e0 une page contenant des informations confidentielles ou exclusives.<\/li><\/ul>","data":{"listType":"unordered"},"style":{"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">With the MemberPress Rules function, you can easily protect any content on your site using the parameters that make the most sense for the situation.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">With the MemberPress Rules function, you can easily protect any content on your site using the parameters that make the most sense for the situation.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h2 class=\"wp-block-heading\">How to Protect Content Based on Roles and Capabilities with MemberPress (2 Methods)<\/h2>","content":"Comment prot\u00e9ger le contenu en fonction des r\u00f4les et des capacit\u00e9s avec MemberPress (2 m\u00e9thodes)","data":[],"style":{"align":"left","parent_style":{},"header":"h2","fontSize":"27px"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">In most circumstances, you\u2019ll protect your site content based on membership designation. However, if you do find it necessary to protect content based on roles or capabilities, MemberPress gives you the flexibility to do so. Here\u2019s how.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">In most circumstances, you\u2019ll protect your site content based on membership designation. However, if you do find it necessary to protect content based on roles or capabilities, MemberPress gives you the flexibility to do so. Here\u2019s how.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\">Method 1: Protect Content Based on a Role<\/h3>","content":"M\u00e9thode 1 : Prot\u00e9ger le contenu en fonction d'un r\u00f4le","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">If you haven\u2019t already done so, create the content you want to protect.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">If you haven\u2019t already done so, create the content you want to protect.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Next, from your WordPress dashboard, go to <em>MemberPress<\/em> &gt; <em>Rules &gt; Add New<\/em>:<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Next, from your WordPress dashboard, go to <em>MemberPress<\/em> &gt; <em>Rules &gt; Add New<\/em>:<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules.png\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-1024x569.png\" alt=\"Screenshot of MemberPress admin dashboard\" class=\"wp-image-25248\"\/><\/a><\/figure><\/div>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-1024x569.png","data":{"linkSrc":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules.png","alt":"Screenshot of MemberPress admin dashboard","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-1024x569.png","linkDestination":"media","align":"center"},"style":{"width":1024,"height":569,"align":"center","parent_style":{},"sizeSlug":"large","alignSelf":"center"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Under <em>Protected Content<\/em>, select the post or page you want to protect. In the <em>Access Conditions<\/em> menu, select <em>Role<\/em>: <\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Under <em>Protected Content<\/em>, select the post or page you want to protect. In the <em>Access Conditions<\/em> menu, select <em>Role<\/em>: <\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select.png\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select-1024x389.png\" alt=\"Screenshot of MemberPress admin - Rules options.\" class=\"wp-image-25249\"\/><\/a><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select-1024x389.png","data":{"linkSrc":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select.png","alt":"Screenshot of MemberPress admin - Rules options.","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-select-1024x389.png","linkDestination":"media"},"style":{"width":1024,"height":389,"align":"left","parent_style":{},"sizeSlug":"large"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Once you do, a dropdown menu will appear to the right. From it, select the specific role you want to allow access to:<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Once you do, a dropdown menu will appear to the right. From it, select the specific role you want to allow access to:<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles.png\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-1024x388.png\" alt=\"Screenshot of MemberPress admin - Rules option selected: Editor.\" class=\"wp-image-25250\"\/><\/a><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-1024x388.png","data":{"linkSrc":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles.png","alt":"Screenshot of MemberPress admin - Rules option selected: Editor.","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-roles-1024x388.png","linkDestination":"media"},"style":{"width":1024,"height":388,"align":"left","parent_style":{},"sizeSlug":"large"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">If you have third-party plugins that automatically create WordPress roles, you'll notice these are listed here in addition to the default WordPress roles of Administrator, Editor, Author, Contributor, and Subscriber.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">If you have third-party plugins that automatically create WordPress roles, you'll notice these are listed here in addition to the default WordPress roles of Administrator, Editor, Author, Contributor, and Subscriber.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">For example, <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce<\/a> adds the roles of Customer and Shop Manager to WordPress. If you wanted to create content and make it visible only to those who have purchased products from you, you could use a role-based rule to do so.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">For example, <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\" target=\"_blank\" rel=\"noreferrer noopener\">WooCommerce<\/a> adds the roles of Customer and Shop Manager to WordPress. If you wanted to create content and make it visible only to those who have purchased products from you, you could use a role-based rule to do so.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">You can also add additional rules to any piece of content by selecting the <em>Plus<\/em> (+) icon under <em>Access Conditions<\/em>. This gives you the ability to completely customize your permissions.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">You can also add additional rules to any piece of content by selecting the <em>Plus<\/em> (+) icon under <em>Access Conditions<\/em>. This gives you the ability to completely customize your permissions.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h3 class=\"wp-block-heading\">Method 2: Restrict Content Based on a Capability<\/h3>","content":"M\u00e9thode 2 : Restreindre le contenu sur la base d'une capacit\u00e9","data":[],"style":{"align":"left","parent_style":{},"header":"h3","fontSize":"21px"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Create the content you want to protect, then go to <em>MemberPress<\/em> &gt; <em>Rules &gt;<\/em> <em>Add New<\/em> as we described above. <\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Create the content you want to protect, then go to <em>MemberPress<\/em> &gt; <em>Rules &gt;<\/em> <em>Add New<\/em> as we described above. <\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Under <em>Protected Content<\/em>, select the content you want to protect. Go to <em>Access Conditions<\/em> and select <em>Capabilities<\/em>:<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Under <em>Protected Content<\/em>, select the content you want to protect. Go to <em>Access Conditions<\/em> and select <em>Capabilities<\/em>:<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select.png\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select-1024x387.png\" alt=\"Screenshot of MemberPress admin - Capabilities options.\" class=\"wp-image-25251\"\/><\/a><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select-1024x387.png","data":{"linkSrc":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select.png","alt":"Screenshot of MemberPress admin - Capabilities options.","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-select-1024x387.png","linkDestination":"media"},"style":{"width":1024,"height":387,"align":"left","parent_style":{},"sizeSlug":"large"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">In the field that appears to the right, type the function for the capability you want to grant access to. Any user with that capability will be allowed to access the content:<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">In the field that appears to the right, type the function for the capability you want to grant access to. Any user with that capability will be allowed to access the content:<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities.png\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-1024x552.png\" alt=\"Screenshot of MemberPress admin - Capabilities option entered: edit_posts.\" class=\"wp-image-25252\"\/><\/a><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-1024x552.png","data":{"linkSrc":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities.png","alt":"Screenshot of MemberPress admin - Capabilities option entered: edit_posts.","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/memberpress-rules-capabilities-1024x552.png","linkDestination":"media"},"style":{"width":1024,"height":552,"align":"left","parent_style":{},"sizeSlug":"large"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">You can find a list of default capability functions in the <a href=\"https:\/\/wordpress.org\/support\/article\/roles-and-capabilities\/#capabilities\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress Codex<\/a>. To create a rule based on capabilities, you must type the capability name in the same format as it is listed in the WordPress Codex:<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">You can find a list of default capability functions in the <a href=\"https:\/\/wordpress.org\/support\/article\/roles-and-capabilities\/#capabilities\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress Codex<\/a>. To create a rule based on capabilities, you must type the capability name in the same format as it is listed in the WordPress Codex:<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/image","render":"<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities.png\"><img src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities-1024x495.png\" alt=\"wordpress codex screenshot\" class=\"wp-image-25253\"\/><\/a><\/figure>","content":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities-1024x495.png","data":{"linkSrc":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities.png","alt":"wordpress codex screenshot","src":"https:\/\/memberpress.com\/wp-content\/uploads\/2021\/01\/wordpress-codex-author-capabilities-1024x495.png","linkDestination":"media"},"style":{"width":1024,"height":495,"align":"left","parent_style":{},"sizeSlug":"large"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">You can add additional rules to any piece of content by selecting the <em>Plus<\/em> (+) icon under <em>Access Conditions<\/em>.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">You can add additional rules to any piece of content by selecting the <em>Plus<\/em> (+) icon under <em>Access Conditions<\/em>.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/heading","render":"<h2 class=\"wp-block-heading\">Conclusion<\/h2>","content":"Conclusion","data":[],"style":{"align":"left","parent_style":{},"header":"h2","fontSize":"27px"}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Generally, you'll protect content on your membership website based on membership tiers. However, there may be instances where it\u2019s helpful to protect content based on a WordPress role or capability. <\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Generally, you'll protect content on your membership website based on membership tiers. However, there may be instances where it\u2019s helpful to protect content based on a WordPress role or capability. <\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\"><a href=\"https:\/\/memberpress.com\" target=\"_blank\" rel=\"noreferrer noopener\">MemberPress<\/a> gives you the flexibility and freedom to create these rules and control your content in the way that makes the most sense for your site.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\"><a href=\"https:\/\/memberpress.com\" target=\"_blank\" rel=\"noreferrer noopener\">MemberPress<\/a> gives you the flexibility and freedom to create these rules and control your content in the way that makes the most sense for your site.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">In this article, we discussed the Roles and Capabilities rules feature of MemberPress. We shared a few reasons you may want to use these options, and showed you how to add these rules in a few simple steps.<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">In this article, we discussed the Roles and Capabilities rules feature of MemberPress. We shared a few reasons you may want to use these options, and showed you how to add these rules in a few simple steps.<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\">Do you have any questions about protecting your content based on roles or capabilities? Let us know in the comments section below!<\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\">Do you have any questions about protecting your content based on roles or capabilities? Let us know in the comments section below!<\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}},{"type":"core\/paragraph","render":"<p class=\"wp-block-paragraph\"><strong>If you liked this article, be sure to follow us on <a href=\"https:\/\/www.facebook.com\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">Facebook<\/a>, <a href=\"https:\/\/twitter.com\/memberpress\" rel=\"noreferrer noopener\" target=\"_blank\">Twitter<\/a>, <a href=\"https:\/\/www.instagram.com\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">Instagram<\/a>, and <a href=\"https:\/\/www.linkedin.com\/showcase\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">LinkedIn<\/a>!<\/strong><\/p>","content":[{"type":"text","data":"<p class=\"wp-block-paragraph\"><strong>If you liked this article, be sure to follow us on <a href=\"https:\/\/www.facebook.com\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">Facebook<\/a>, <a href=\"https:\/\/twitter.com\/memberpress\" rel=\"noreferrer noopener\" target=\"_blank\">Twitter<\/a>, <a href=\"https:\/\/www.instagram.com\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">Instagram<\/a>, and <a href=\"https:\/\/www.linkedin.com\/showcase\/memberpress\/\" rel=\"noreferrer noopener\" target=\"_blank\">LinkedIn<\/a>!<\/strong><\/p>"}],"data":[],"style":{"textAlign":"left","color":"","dropCap":false,"parent_style":{}}}],"app_access":{"can_access":true,"restrict_message":null},"_links":{"self":[{"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/posts\/25247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/users\/76756"}],"replies":[{"embeddable":true,"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/comments?post=25247"}],"version-history":[{"count":0,"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/posts\/25247\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/media\/25454"}],"wp:attachment":[{"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/media?parent=25247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/categories?post=25247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/memberpress.com\/fr\/wp-json\/wp\/v2\/tags?post=25247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}