WPFront
  • Home
  • Plugins
    • Notification Bar Plugin
      • Plugin Ideas
      • Plugin Settings
      • Plugin FAQ
    • Scroll Top Plugin
      • Plugin Settings
      • Plugin FAQ
    • User Role Editor Plugin
      • Plugin Documentation
      • Plugin Settings
      • Plugin FAQ
    • Paddle Gateway Plugin
  • Go Pro
  • Support
    • Documentation
    • FAQ
  • Affiliates
  • Contact
  • Login
  • Cart
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • February 20, 2016 at 2:18 pm in reply to: Hide hidden/locked pages from custom theme category page #24901
    Joseph Jordan
    Participant
    This reply has been marked as private.
    February 20, 2016 at 2:16 pm in reply to: Hide hidden/locked pages from custom theme category page #24900
    Joseph Jordan
    Participant

    Hello Syam,

    We would specifically want to take the current check:

    if(current_user_can('editor')) {
    
    }

    and make it something like “if current user has permission by how the permissions were selected in the article, then they can see the post”.

    something like (if(current_user_can(‘read’)). But this meaning that the current user can only see those posts and article titles and article excerpts that were given permission.

    Thank you,

    February 19, 2016 at 4:11 am in reply to: Hide hidden/locked pages from custom theme category page #24814
    Joseph Jordan
    Participant

    Final followup question – if it’s not a good idea to add this tag into the template, is there a way I can add this custom post type to the roles plugin so it will correctly block the title?

    February 19, 2016 at 3:05 am in reply to: Hide hidden/locked pages from custom theme category page #24781
    Joseph Jordan
    Participant

    I was wrong – I just noticed that “current_user_can” is a function of WordPress, not of User Role Editor.

    Hopefully that will explain what I need though –

    Basically I need a check of “IF “current user can” -> “view posts as defined by the role permission of each post” THEN “View hkb-content-article” ELSE “hide the post”.

    February 19, 2016 at 2:16 am in reply to: Hide hidden/locked pages from custom theme category page #24777
    Joseph Jordan
    Participant

    I may be close to a solution…

    When wrapping the incorrectly displaying locked pages with:

       <?php if (current_user_can('edit_nav_menu_permissions')) : ?>
                <?php hkb_get_template_part('hkb-content-article'); ?>
                <?php the_excerpt(); ?>
    
    <?php else :?>
    Denied.
    <?php endif; ?>

    The menu shows “Denied” if the user cannot edit nav menu permissions. Obviously we don’t want to deny on this, but we want to deny on whether or not that user’s role is denied within the post.

    Am I on the right track? If so, what should I be using instead of “Edit nav menu permissions”?

    Thank you!

    February 18, 2016 at 12:01 am in reply to: Hide hidden/locked pages from custom theme category page #24704
    Joseph Jordan
    Participant
    This reply has been marked as private.
    February 16, 2016 at 9:14 pm in reply to: Hide hidden/locked pages from custom theme category page #24596
    Joseph Jordan
    Participant
    This reply has been marked as private.
    February 16, 2016 at 2:51 am in reply to: Hide hidden/locked pages from custom theme category page #24550
    Joseph Jordan
    Participant

    Apologies for the spelling errors above!

    Just to elaborate- we don’t have a paid/public role structure, otherwise something like:
    < ?php echo do_shortcode('[paid_read_more]Read More[/paid_read_more]'); ?>
    would work.

    We have a membership role for each dept. Example: HR dept can view HR pages. IT dept can view IT pages, etc. So it will literally need to check if the “title” as our template stores them is a visible post type based on that user’s permissions.

    Any idea on how to accomplish this? Thank you!

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
Log In
Lost Password

Search Topics

Documentation

FAQ
Roles List Add Role Edit Role Delete Role Restore Role Add or Remove Capability Assign/Migrate Users Posts/Pages Extended Permissions Custom Post Type Permissions Navigation Menu Permissions Widget Permissions Admin Menu Editor Media/Attachment File Permissions User Level Permissions Content Restriction Shortcodes Login Redirect Export Roles Import Roles Bulk Edit Settings Multisite Roles List Multisite Add New Role Multisite Edit Role Multisite Delete Role Multisite Restore Role Multisite Sync Roles Multisite Settings WordPress Capabilities Actions and Filters Installation Instructions