Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] Send not logged in user directly to login page

Simple Membership Plugin › Forums › Simple Membership Plugin › Send not logged in user directly to login page

  • This topic has 5 replies, 3 voices, and was last updated 5 years, 11 months ago by Dany-bf.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • June 30, 2018 at 6:17 pm #14840
    wauw
    Participant

    Is it possible to skip the ‘You need to login to view this content.’ message and send a not logged in user directly to the login page? The advantage of the login-page is that I can style it with visual composer.

    As soon as a not logged in user enters the protected page, he will be redirected to the login page instead of the message.

    I know how I can change this message by using the custom message plugin. I also know how to paste the login form with a shortcode.

    The problem is that the custom message appears in a blank default page template and isn’t a page in my wordpress pages menu. This makes it impossible to style it with visual composer.

    July 1, 2018 at 1:02 pm #14841
    The Assurer
    Moderator

    If you have an intermediate proficiency with PHP coding, you can modify the simple-membership\classes\class.swpm-access-control.php file, to behave in the manner desired. Otherwise, what you are asking is outside the scope of the free support forum; and you must submit a Paid Support request.

    Hint:  /*** At this point, we have a protected post. So we need to check if this user can view this post. ***/

    July 1, 2018 at 7:50 pm #14844
    wauw
    Participant

    Thanks for your reply! I’ll give it a try.

    Maybe an idea for a future update to make it possible to go directly to the login screen. In my opinion it’s obvious that you can’t see the content when a login form appears. The text ‘You need to login to view this content.’ can be above the login form.

    July 2, 2018 at 1:47 pm #14853
    wauw
    Participant

    Worked!!

    July 2, 2018 at 6:20 pm #14854
    The Assurer
    Moderator

    Congratulations; you know “enough” PHP coding to be dangerous   8)

    December 3, 2020 at 5:18 pm #21656
    Dany-bf
    Participant

    Hello!
    I like to have the same way – may you show me the part of the PHP-Code?
    Thank you for help!

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy