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
  • This topic has 3 replies, 2 voices, and was last updated 10 years, 1 month ago by Ahmed Daher.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 6, 2015 at 6:16 am #7231
    Ahmed Daher
    Participant

    Is there a way that a non-logged in user would see a page asking them to log in if they tried to follow a link to a post that they did not have permission to see (rather than a standard 404 page)? Thanks!

    April 6, 2015 at 6:54 pm #7267
    Syam Mohan
    Keymaster

    Hi Ahmed,

    There are no filters or actions to hook into a 404 when the user doesn’t have permission. If you are familiar with editing PHP files and WordPress functions, you can create a custom 404 page with the content short-codes functionality and the following tutorial.

    https://codex.wordpress.org/Creating_an_Error_404_Page

    Even if you do this, every 404 will display the login page, not just the pages where they don’t have permission. I’ll add this to my to do list, but I’m not guaranteeing it at this moment.

    Thanks

    Syam

    April 7, 2015 at 10:36 pm #7324
    Syam Mohan
    Keymaster

    You could just use the content shortcodes to hide the content and display a login form, without using extended permissions.

    April 8, 2015 at 8:21 am #7366
    Ahmed Daher
    Participant

    Thanks, this will give me something to work with.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Log in to view instead of 404?’ is closed to new replies.
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