Title: Codifigata &#8211; Content Login Gate
Author: Codifigata
Published: <strong>24 juillet 2026</strong>
Last modified: 14 août 2026

---

Recherche d’extensions

![](https://ps.w.org/codifigata-content-login-gate/assets/banner-772x250.png?rev
=3621601)

![](https://ps.w.org/codifigata-content-login-gate/assets/icon-256x256.png?rev=3621601)

# Codifigata – Content Login Gate

 Par [Codifigata](https://profiles.wordpress.org/codifigata/)

[Télécharger](https://downloads.wordpress.org/plugin/codifigata-content-login-gate.1.5.0.zip)

 * [Détails](https://fr.wordpress.org/plugins/codifigata-content-login-gate/#description)
 * [Avis](https://fr.wordpress.org/plugins/codifigata-content-login-gate/#reviews)
 *  [Installation](https://fr.wordpress.org/plugins/codifigata-content-login-gate/#installation)
 * [Développement](https://fr.wordpress.org/plugins/codifigata-content-login-gate/#developers)

 [Support](https://wordpress.org/support/plugin/codifigata-content-login-gate/)

## Description

Codifigata – Content Login Gate lets you restrict the entire content of a post/page,
or just part of it (for example download buttons), to logged-in users, showing a
login button to logged-out visitors in place of the restricted content.

**Two usage modes**

 1. **Gate the entire content** — enable it with a simple checkbox in the « Restricted
    access » meta box, shown in the editor sidebar for posts and pages.
 2. **Gate a specific area** — using the `[cdfg_login_gate]...[/cdfg_login_gate]` shortcode,
    which can be added in the Gutenberg « Shortcode » block. Useful for hiding only
    one section of the content (e.g. download buttons) while keeping the rest of the
    post visible.

**Two display modes (Settings  Content Login Gate)**

 * **Blur the content** — the content stays in the page but is visually blurred 
   via CSS, with an overlay and a login button. Effective as a preview/registration
   nudge, but it is not real protection: anyone who views the page source can still
   read the content.
 * **Hide the content** — the restricted content is not included in the HTML sent
   to logged-out users: only the login button appears on the page. Recommended for
   genuinely sensitive content (download links, private information, etc.).

**Features**

 * Works right after activation, with sensible defaults.
 * Settings page with a color picker to customize the button’s background color,
   text color, and label, without writing code.
 * CSS is only loaded on pages where the gate is actually active (no impact on pages
   without restricted content).
 * Login button URL: defaults to the standard WordPress login page (`wp-login.php`),
   with an optional field in Settings to point it to a custom login page instead,
   plus automatic redirect back to the original content after login (the redirect
   parameter name is also configurable, for custom login pages that don’t use `redirect_to`).
 * Optional FontAwesome icon before the button label, if FontAwesome is already 
   loaded by your theme or another plugin.
 * Supported post types customizable via a PHP filter.
 * `min_height` and `label` shortcode attributes to customize each individual restricted
   area.

**Developer filters**

    ```
    cdfg_clg_login_url (string $login_url, string $redirect)
    ```

Filters the base URL of the login page. Default: `wp_login_url()`, or the URL set
in Settings  Content Login Gate if not empty.

    ```
    cdfg_clg_button_label (string $label)
    ```

Filters the default label of the login button.

    ```
    cdfg_clg_post_types (array $post_types)
    ```

Filters the list of post types on which the « Restricted access » meta box is shown.
Default: `array( 'post', 'page' )`.

Example:

    ```
    add_filter( 'cdfg_clg_login_url', function( $url, $redirect ) {
        return home_url( '/sign-in/' );
    }, 10, 2 );

    add_filter( 'cdfg_clg_post_types', function( $post_types ) {
        $post_types[] = 'product';
        return $post_types;
    } );
    ```

## Installation

 1. Upload the plugin folder to `/wp-content/plugins/`, or install it from the WordPress«
    Plugins » screen.
 2. Activate the plugin from the WordPress « Plugins » menu.
 3. (Optional) Go to Settings  Content Login Gate to choose the display mode (blur/
    hide) and customize the button’s colors, label, and login page URL.
 4. (Optional) If you use a custom login page instead of the default `wp-login.php`,
    set its URL in Settings  Content Login Gate (or with the `cdfg_clg_login_url` filter).
    If that page expects a redirect parameter other than `redirect_to`, set its name
    in the « Redirect parameter name » field too, otherwise the redirect back to the
    content won’t work.
 5. To gate the entire content: open a post or page, enable the « Require login to 
    view the content » checkbox in the « Restricted access » meta box, and save.
 6. To gate just one area: in the block editor, add a « Shortcode » block with `[cdfg_login_gate]...[/
    cdfg_login_gate]` around the content you want to restrict.

## FAQ

### Does the plugin work with any theme?

Yes. The gate is applied through the `the_content` filter and through the shortcode,
so it works with any theme that uses standard WordPress functions to output content.

### Can I use the shortcode on post types other than posts and pages?

Yes, the `[cdfg_login_gate]` shortcode works anywhere `do_shortcode()` is executed(
content, widgets that support shortcodes, etc.). The « entire content » meta box,
however, is limited to the post types filterable with `cdfg_clg_post_types`.

### How do I customize the button label for just one area?

Add the `label` attribute to the shortcode, for example: `[cdfg_login_gate label
="Unlock download"]...[/cdfg_login_gate]`.

### What is the security difference between « blur » and « hide »?

With « blur the content », the restricted content is still present in the page’s
HTML and is only visually hidden via CSS: anyone who views the page source, disables
CSS, or makes a direct request to the page can still read it. It is meant as a preview/
registration nudge, not as protection. With « hide the content », the restricted
content is not included in the HTML generated for logged-out users: only the button
markup is sent instead. Use this second mode for genuinely sensitive content.

### Is the restricted content exposed in RSS feeds?

No, regardless of the selected mode. In feeds, where the CSS overlay is not available,
the plugin always replaces the restricted content with a short text notice and a
link to the login page.

### What happens to the plugin’s data on uninstall?

On uninstall (not on simple deactivation), the plugin removes the post meta that
marks restricted content and the settings option (mode, colors, button label, login
page URL, redirect parameter name, icon class). No database tables are created.

## Avis

Il n’y a aucun avis pour cette extension.

## Contributeurs/contributrices & développeurs/développeuses

« Codifigata – Content Login Gate » est un logiciel libre. Les personnes suivantes
ont contribué à cette extension.

Contributeurs

 *   [ Codifigata ](https://profiles.wordpress.org/codifigata/)

[Traduisez « Codifigata – Content Login Gate » dans votre langue.](https://translate.wordpress.org/projects/wp-plugins/codifigata-content-login-gate)

### Le développement vous intéresse ?

[Parcourir le code](https://plugins.trac.wordpress.org/browser/codifigata-content-login-gate/),
consulter le [SVN dépôt](https://plugins.svn.wordpress.org/codifigata-content-login-gate/),
ou s’inscrire au [journal de développement](https://plugins.trac.wordpress.org/log/codifigata-content-login-gate/)
par [RSS](https://plugins.trac.wordpress.org/log/codifigata-content-login-gate/?limit=100&mode=stop_on_copy&format=rss).

## Journal des modifications

#### 1.5.0

 * Fixed: the login button linked to `/login/` by default, a URL that doesn’t exist
   on most sites unless a page with that exact slug has been created. It now defaults
   to the standard WordPress login page (`wp-login.php`).
 * Added a « Login page URL » field in Settings  Content Login Gate to point the
   button to a custom login page, as an alternative to the `cdfg_clg_login_url` 
   filter.
 * Added a « Redirect parameter name » field, so the post-login redirect also works
   with custom login pages that don’t use the `redirect_to` parameter expected by`
   wp-login.php`.
 * Added a « Button icon (FontAwesome class) » field in Settings  Content Login 
   Gate to replace the default lock icon with a FontAwesome icon (e.g. `fa-solid
   fa-lock`). Requires FontAwesome to already be loaded by your theme or another
   plugin: this plugin does not load it itself.

#### 1.4.0

 * Internal hardening to avoid naming collisions with other plugins (including other
   Codifigata plugins): the main class now lives under the `Codifigata\ContentLoginGate`
   PHP namespace, and all global constants, option names, meta key, nonce, and developer
   filters use the `cdfg_clg_` prefix instead of the bare `cdfg_` one. The `[cdfg_login_gate]`
   shortcode is unchanged.
 * Developers using the `cdfg_login_url`, `cdfg_button_label`, or `cdfg_post_types`
   filters must switch to `cdfg_clg_login_url`, `cdfg_clg_button_label`, and `cdfg_clg_post_types`.

#### 1.3.0

 * Renamed the `[login_gate]` shortcode to `[cdfg_login_gate]` to avoid collisions
   with other plugins/themes.
 * Removed bundled translation files; translations are now handled entirely through
   translate.wordpress.org.
 * Hardened shortcode output sanitization while preserving support for core Gutenberg
   blocks (Embed, Search, Social Icons, etc.).

#### 1.2.0

 * Added the Settings page (Settings  Content Login Gate) with a color picker for
   background color, text color, and default button label.
 * Added the « hide the content » display mode: restricted content can now be fully
   excluded from the HTML sent to logged-out users, instead of only being blurred
   via CSS.

#### 1.1.0

 * First version published on WordPress.org.
 * Gate the entire content via meta box, and a partial gate via the `[cdfg_login_gate]`
   shortcode.
 * Developer filters: `cdfg_login_url`, `cdfg_button_label`, `cdfg_post_types`.
 * Gate CSS loaded only when needed; dedicated handling for RSS feeds.

## Méta

 *  Version **1.5.0**
 *  Dernière mise à jour **il y a 3 semaines**
 *  Installations actives **Moins de 10**
 *  Version de WordPress ** 5.8 ou plus **
 *  Testé jusqu’à **7.1**
 *  Version de PHP ** 7.4 ou plus **
 *  Langue
 * [English (US)](https://wordpress.org/plugins/codifigata-content-login-gate/)
 * Étiquettes
 * [content-protection](https://fr.wordpress.org/plugins/tags/content-protection/)
   [login](https://fr.wordpress.org/plugins/tags/login/)[membership](https://fr.wordpress.org/plugins/tags/membership/)
   [restrict content](https://fr.wordpress.org/plugins/tags/restrict-content/)[shortcode](https://fr.wordpress.org/plugins/tags/shortcode/)
 *  [Vue avancée](https://fr.wordpress.org/plugins/codifigata-content-login-gate/advanced/)

## Évaluations

Aucun avis n’a encore été envoyé.

[Votre avis](https://wordpress.org/support/plugin/codifigata-content-login-gate/reviews/#new-post)

[Tout voir](https://wordpress.org/support/plugin/codifigata-content-login-gate/reviews/)

## Contributeurs

 *   [ Codifigata ](https://profiles.wordpress.org/codifigata/)

## Support

Quelque chose à dire ? Besoin d’aide ?

 [Voir le forum de support](https://wordpress.org/support/plugin/codifigata-content-login-gate/)