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!!!! Pages Protects using SMP and any Visual Theme Builder

Simple Membership Plugin › Forums › Simple Membership Plugin › RESOLVED!!!! Pages Protects using SMP and any Visual Theme Builder

Tagged: page protect, resolved, visual editor

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 9 months ago by cupido.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 1, 2016 at 10:35 am #5560
    cupido
    Participant

    Good morning to all,
    by two days I’m slamming to solve a big problem for me. On wordpress i use a visual editor for my theme and my pages, and I was trying to protect pages using Simple Membership Plugin, but I could not!

    I read most of the posts on this forum for this problem but I had not yet found any solution, this morning there I found it and I’d like to share with you, this important solution!

    In my wordpress site I use ProfitBuilder and i activate also the theme and I think what I am about to explain to you can also apply to all other visual editors, like Thrive, etc … (i try this solution only in ProfitBuilder at this moment!)

    Here’s what you need and what to do to implement a proper reserved area using Simple Membership Plugin and a visual editor.

    1) Create a child theme of your actual theme;

    2) Inside the child theme folder create “functions.php” file and write into this Auto Redirect Non Logged-in Users (Protect Whole Site) code:

    /***  Auto redirect a user who isn't logged into the site ***/
    add_filter( 'pre_get_posts', 'swpm_auto_redirect_non_members' );
    function swpm_auto_redirect_non_members() {
        if( !SwpmMemberUtils::is_member_logged_in() && !is_page( array( 'membership-login', 'membership-join' )) ) {
            wp_redirect( 'http://www.your-domain.com/membership-login' );
            exit;
        }
    }

    3) Install on your site Jonradio Multiple Themes by David Gewirtz;

    4) inside settings of this plugin, set up all of your protected pages using this child theme that you create just now and leave all others settings as is;

    5) clean up all cache of your site;

    6) enjoy this trick!!!

    In my wordpress site works very well and i so enjoy that i would share my work with all of you!!!

    I hope that this solution will work on other visual editors indeed I encourage you to try it on your visual publishing system and indicate below if it works or not.

    Thank you all and see you soon!

    Francesco from Italy

    March 1, 2016 at 10:58 pm #5565
    mbrsolution
    Moderator

    Hi Francesco, thank you for sharing. Did you by any chance read the following documentation?

    Regards

    March 2, 2016 at 7:33 am #5579
    cupido
    Participant

    Sure … I used the same fragment code of course but using the advantages of a child theme and a specific plugin that control the changing of theme. It’s different. If i use only this code obviously protects the ENTIRE content of my site, my goal instead was to protect only some pages of my site created by my visual editor. And in this way i resolved!

    It would be interesting to know if this technique also works well with other visual editor such as Thrive, Instabuilder, etc …

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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