Support » Plugin: Restrict Content by Role » Restricted public content hidden from menus

  • Resolved SRD75

    (@srd75)



    Hi,

    I’ve left “Hide restricted public content from menus” unchecked, but pages that are restricted from public view are being hidden in the primary menu.

    Plugin Version 3.4.2

    Help appreciated.

    Regards,
    Steve

Viewing 11 replies - 1 through 11 (of 11 total)
  • I’ve checked “Hide restricted public content from menus”, click save, then unchecked the same setting, clicked save, and the issue remains.

    Plugin Author Matt Watson

    (@mwtsn)

    Could you share the settings you have checked on one of the pages that is hidden please?

    Thanks for your response Matt, sure:

    yes, me too i have the same issue. And if i try to restrict access to a parent item, than that one disappears and the child ones become first level items. But i left the “Hide restricted public content from menus” unchecked in general settings.

    Thank you for your help, my best regards,

    Emanuele

    • This reply was modified 2 years, 1 month ago by  slenn78.

    Hullo? 🙂

    Hello @mwtsn?

    Plugin Author Matt Watson

    (@mwtsn)

    Hi SRD75,

    I will get to this as soon as I can, I have a lot going on at the moment.

    Matt

    @srd75 Same issue here. Thought I was going crazy! Frustrating as this seems to be the most straight forward / cleanest plugin out there for this purpose but is unusable at the moment due to this issue.

    It’s not just the menu items not showing – try and access pages publicly that are set to restrict for a certain role (other than public) and you get denied.

    Hi guys!

    I like Restrict Content by Role plugin (many thanks to the authors!), it’s lightweight and suits my needs. Unfortunatelly, I came accross the same problem as mentioned above, restricted content was hidden from a menu although I left that option unchecked. Since Matt says he is bussy to take a closer look at the issue, I tried to find what’s happening there.

    I found following line (#28) in the plug-in file restrict-content-by-role/php/class.MenuAccess.php:

    if( 'false' === $mkdo_rcbr_hide_from_menus || is_admin() ) {

    It compares $mkdo_rcbr_hide_from_menus against ‘false’ but it has ” (empty string) value when you don’t check “Hide restricted public content from menus ” in the settings. Changing the line to

    if( '' === $mkdo_rcbr_hide_from_menus || is_admin() ) {

    works for me, menu items are left in place. So if there is anyone looking for an instant fix, try to do this little update yourself using the plugin editor in WordPress admin. I hope this may help Matt to fix the issue in the following version of the plugin too.

    Rado

    Plugin Author Matt Watson

    (@mwtsn)

    Hi all,

    Thank you for your patience, I’ve finally managed to put some time into looking at this.

    Rado, thank you for your solution, I will push that into the next release.

    All, if you are trying to restrict a menu that is powered by a widget, the function will not work. I’ll update the instructions to reflect this.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Restricted public content hidden from menus’ is closed to new replies.