Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Aldo Latino

    (@aldolat)

    Hi @stefacchio,
    Could you paste the full shortcode line you’re using? For example:

    [private role="subscriber" alt="You have not rights to read this."]Text for subscribers and higher roles[/private]
    Thread Starter Stefano

    (@stefacchio)

    [private role="subscriber" alt="Devi essere loggato" container="div"]
    [contact-form-7 id="808" title="Iscrizione ai raduni - eventi"]
    [/private]

    Also without contact form shortcode is the same..

    Plugin Author Aldo Latino

    (@aldolat)

    On my servers the shortcode is working well with and without shortcodes – the roles are respected and div is used instead of p.

    These lines are fully functioning:

    [private  role="subscriber" alt="Devi essere loggato" container="div"]
    [gallery link="file" ids="1027,1022,1029"]
    [/private]

    and the nested shortcode is working fine.

    Please, check the Contact Form 7 shortcode – it seems there be a typo: [contact-sform-7 id=...

    Also, are you using a plugin to manage roles and capabilities?

    Thread Starter Stefano

    (@stefacchio)

    I correct cf7 shortcode but is the same.. Also if I write a simple text it doesn’t work.

    I use ‘adminimize’ and ‘wp user avatar’ but they don’t change users role..

    Plugin Author Aldo Latino

    (@aldolat)

    Could you tell me the URL of your webpage where you are using the shortcode? I’ll visit it and I should see the “Devi essere loggato” text (because I will not be logged in).

    Thread Starter Stefano

    (@stefacchio)

    Sure, https://www.automotostorichetreviglio.it/tariffe-iscrizioni/

    If you are logged with subscriber user or if you are not logged in is the same and the alternate text isn’t visible..

    Plugin Author Aldo Latino

    (@aldolat)

    OK, I do not see the text.

    The problem is surely due to a plugin or the theme you are using. You should disable all the active plugins except “Private Content” and activate the default theme (like Twenty Fifteen) and test if the plugin’s shortcode works fine.

    To avoid touching your live site, it’s a better option creating an exact copy of the site in your localhost environment and making what I said before in a safe place (without touching your live site).

    Let me know.

    Thread Starter Stefano

    (@stefacchio)

    I tried to activate default theme and private content works fine….
    So there is a conflict with my theme.. how do I fix it?

    Bye

    Thread Starter Stefano

    (@stefacchio)

    maybe changing shortcode name of plugin? for example instead of [private][/private] use [something else][/something else] ? Can I try this modification?

    Thread Starter Stefano

    (@stefacchio)

    Good.. I edit

    add_shortcode('private', 'ubn_private_content')

    to

    add_shortcode('test', 'ubn_private_content')

    and it works fine..

    So my advice is to set a shortcode more customized or not? if you are agree can you edit it on next plugin update?

    Thanks
    Regards

    Plugin Author Aldo Latino

    (@aldolat)

    Glad you solved! ??

    Currently this plugin is used by 6.000+ users so changing the shortcode would be nightmare. If I change the shortcode, all the private notes would be displayed to all users. So it’s not possible. ??

    Thread Starter Stefano

    (@stefacchio)

    I didn’t think to this huge problem ??

    So in the future when you’ll update plugin I will must remember to edit again add_shortcode function, right?

    Bye
    Thanks for your help

    Plugin Author Aldo Latino

    (@aldolat)

    Yes. My advice is to not update the plugin automatically. Instead, if an update will be published, download manually the new release, change the code, and upload to your site.

    Anyway, future updates will be very rare, because this plugin is designed to be kept as simple as possible.

    Thread Starter Stefano

    (@stefacchio)

    Ok many thanks.. I also try to explain the problem to theme developers..

    Bye

    same problem, but i cant find the code in this thread

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Plugin works only with administrator role’ is closed to new replies.