Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author thomstark

    (@thomstark)

    Yes, it will certainly accommodate you.

    Thread Starter dave8528

    (@dave8528)

    I tried intalling upon activating, I got this error:

    Plugin could not be activated because it triggered a fatal error.
    Fatal error: Cannot redeclare requires_wordpress_version() (previously declared in /public_html/domain.com/wp-content/plugins/cloud-zoom-for-woocommerce/index.php:33) in /public_html/domain.com/wp-content/plugins/eyes-only-user-access-shortcode/sseo-admin.php on line 20

    Thread Starter dave8528

    (@dave8528)

    I guess this plugin doesn’t work with the latest WP version. Am I correct?

    Plugin Author thomstark

    (@thomstark)

    It certainly does work with the latest WP version.

    As your error message indicates, this is a conflict with the Cloud Zoom for WooCommerce plugin.

    If you open up wp-content/plugins/eyes-only-user-access-shortcode/sseo-admin.php

    You just need to modify two lines:

    change: function requires_wordpress_version() {
    to: function sseo_requires_wordpress_version() {

    then go down a few lines and:

    change: add_action( 'admin_init', 'requires_wordpress_version' );
    to: add_action( 'admin_init', 'sseo_requires_wordpress_version' );

    These changes will be included in the next update.

    Thread Starter dave8528

    (@dave8528)

    Thank you Tom! It worked like a charm ??

    To make things a bit interesting, can I have the page that has multiple access restrictions like:
    [eyesonly level=”organizers”] Content Here [/eyesonly]

    [eyesonly level=”customers”] Content Here [/eyesonly]

    [eyesonly level=”editors”] Content Here [/eyesonly]

    so that if any role other than intended to tries to access it, it will be forwarded to a default page or a pre-defined page?

    Greate plugin by the way. Yu got my five star!

    Plugin Author thomstark

    (@thomstark)

    Glad to hear it.

    Now, first thing I should point out, is you want to put your shortcodes directly next to each other. Otherwise, for instance, editors will see two line breaks at the top of their page. So it should look like this:

    [eyesonly level="organizers"] Content Here [/eyesonly][eyesonly level="customers"] Content Here [/eyesonly][eyesonly level="editors"] Content Here [/eyesonly]

    Now, as for redirecting other users, it is possible to do that with Eyes Only, but you’d have to put javascript directly in your page content, using the Text editor, and then be careful never to update that page with the Visual tab enabled, otherwise WordPress will strip out your javascript. But it can be done like this:

    [eyesonly level="organizers,customers,editors" hide="yes"]<script> window.location = "https://yourdomain.com/page-you-want"; </script>[/eyesonly][eyesonly level="organizers"] Content Here [/eyesonly][eyesonly level="customers"] Content Here [/eyesonly][eyesonly level="editors"] Content Here [/eyesonly]
    Plugin Author thomstark

    (@thomstark)

    But you could also redirect users based on role by using a plugin like User Access Manager: https://www.ads-software.com/plugins/user-access-manager/

    Plugin Author thomstark

    (@thomstark)

    Actually, don’t use User Access Manager. If you’re not going to use Eyes Only for redirects, I recommend WordPress Access Control: https://www.ads-software.com/plugins/wordpress-access-control/

    Thread Starter dave8528

    (@dave8528)

    Well, with either one of those plugins, you’d have to restrict entire page for certain users/roles rather than what I’m talking about which is certain sections of one page. Am I right?
    I will try your suggested solution and see if I get what I want.

    Thanks again.

    Plugin Author thomstark

    (@thomstark)

    I guess I’m not sure what you’re asking. If the user can’t see the content in the eyes only shortcode, then the content is not there for them to attempt to access it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Usage advise’ is closed to new replies.