Membership plans for vendors

Hello, is it possible to have a membership plan for an advertiser? (I see that it’s possible for a page and attributes, but I don’t see it for an advertiser).

Thank you very much for your feedback

Hi,

If you mean a plan, for example, for a vendor to pay for the publication of a listing, then we recommend using the Paid Listings extension: Paid Listings - HivePress Help Center

Hi, to explain in more detail, I used hivepress to create room directories for several hotels.

The hotels are advertisers
I would like each room directory to be private and consulted only by hotel guests.

I don’t know if this is possible and if the answer is clear enough!

In any case, thank you for your help!

Attached is the link to the site if it can help you understand my request.

Hi,

I see. Unfortunately, there is no such feature, it would require a custom implementation.

Thank you for your feedback. Do you know a line of code that would allow me to lock the page (slug) with a password that I would communicate to the customer?
I’ve tried this one but it doesn’t work, the page always opens without a password.

add_action( 'template_redirect', 'custom_page_password_protect' );

function custom_page_password_protect() {
    // Vérifie si la page actuelle a le slug 'c35xb'
    if ( is_page( 'c35xb' ) ) {
        // Vérifie si le mot de passe a été soumis
        if ( isset( $_POST['custom_page_password'] ) && ! empty( $_POST['custom_page_password'] ) ) {
            $password = $_POST['custom_page_password'];
            // Vérifie si le mot de passe est correct
            if ( $password === 'cosmo' ) {
                // Mot de passe correct, ne rien faire
                return;
            } else {
                // Mot de passe incorrect, redirige vers la page actuelle pour afficher à nouveau le formulaire
                wp_redirect( get_permalink() . '?password_incorrect=true' );
                exit;
            }
        } else {
            // Affiche le formulaire de mot de passe
            add_action( 'hivepress/template_part/header', 'custom_page_password_form' );
            exit;
        }
    }
}

function custom_page_password_form() {
    ?>
    <form method="post">
        <p>
            <label for="custom_page_password">Mot de passe :</label><br />
            <input type="password" id="custom_page_password" name="custom_page_password" />
        </p>
        <p><input type="submit" value="Submit" /></p>
    </form>
    <?php
}

Hi,

Unfortunately, there is no simple code for this, it will require advanced customization and possibly a change in the framework.

Thank you very much for taking the time to reply.