Support » Plugin: My Private Site » I need users land into home page

  • Resolved wp-newbee


    Thank you very much for a great plugin.
    I am using your plug in and works great, but I am facing a little problem and I don’t know how to fix it. I was wondering if you have vision or advice can help me.

    The recent site that I am working on is a private site, meaning users entering to visit and download documents. It’s important that they land on home page not into the admin panel/dashboard.

    The Home page is a custom_type blog page.

    I was able to reach my goal( have a private site and land on home page)when I was working in my local xammp environment.

    I moved the site to a new location, exported db from wordpress, followed all the necessary steps, and everything works except one thing that make total sense but I need to fix and I don’t know how.

    Here is the problem:
    The addresses before moving to new site:
    WP url:
    Site url: = home page

    The addresses after moving to new site:
    WP url:
    Site url: = home page

    I am using jonradio-private-site plugin to make the site private and using the below function which was working in my local host. The function supposedly allows user to land on home page.

    add_action(‘login_form’, ‘redirect_after_login’);
    function redirect_after_login() {
    global $redirect_to;
    if (!isset($_GET[‘redirect_to’])) {
    $redirect_to = get_option(‘siteurl’);
    without this function, site still will be private, but user will land in admin panel.

    Now that I have changed the site’s address and copied index and htaccess files to the root and modified the index file, if I keep the function users will land on a page with this url: which of course user sees a wp 404 page.

    So, I need to replace (‘siteurl’) with something else and I have no idea what………any idea or any better way to do this?

    I appreciate any advice


Viewing 6 replies - 1 through 6 (of 6 total)
  • Thank you, I found my answer!
    changed this:
    $redirect_to = get_option(‘siteurl’);

    to this:
    $redirect_to = get_bloginfo(‘url’);

    My apologies for not responding sooner, but I was not automatically informed of this thread, so did not see until now.

    Thank you for taking the time to post your solution!

    I’m having the same issue and don’t quite understand the solution. The code that you have suggested, wp-newbee, goes where? I assume that I will need to alter the $redirect_to function given that I want to land on a static front page, or maybe the get_option(‘siteurl’) will work? Any thoughts would help. If you were looking to make an update, jonradio, some sort of landing page selection option might be worthwhile. Thanks for the otherwise effective plugin!

    I have a new version of the plugin pretty well tested, just lacking the documentation required to update the Plugin Directory. It includes a fair range of options for where you go after you login.

    Hard to predict schedules, as I have an outstanding problem with another plugin that requires re-designing a fair chunk of it. Probably best to contact me privately through and let me know how soon you need it. I’m sure we can work something out.

    I have provided mcrompton with a beta version. I have not released it into the Plugin Directory because it still needs a notification to existing plugin users who are automatically upgrading to the new version, so they won’t be caught by surprise by the change in default when activated from Privacy ON to OFF, now that a Settings page has been added, which allows Privacy to be turned ON and OFF from the Settings page.

    Version 2.0 has now been released, providing a new Landing Location setting as requested.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I need users land into home page’ is closed to new replies.