WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Access Areas
[resolved] IF restricted access (3 posts)

  1. DigiDocs
    Member
    Posted 7 months ago #

    Is there any way to use an IF parameter.
    For an exampel

    if (RESTRICTED POST) {
    echo 'SOMETHING';

    }
    else {

    (I would like an image of a key to appear on the posts that are restriced to logged in users)

    http://wordpress.org/plugins/wp-access-areas/

  2. podpirate
    Member
    Plugin Author

    Posted 4 months ago #

    Hi DigiDocs,
    as of v1.2.1 (just a couple of miniutes ago) there is an action hook called wpaa_view_restricted_post.

    It gets fired, when a user tries to access a restricted page/post directly via its permalink.

    I also added some css classes prefixed with 'wpaa-' to the post object (the ones returned by get_post_class()), so the shortest way for your key symbol would be some css like this:

    .wpaa-view-restricted:before {
            content: url('key.png');
        }

    cheers,
    jörn

  3. podpirate
    Member
    Plugin Author

    Posted 4 months ago #

    whoops, forgot to close ;)

Reply

You must log in to post.

About this Plugin

About this Topic