• Home
  • WordPress Themes
    • eCommerce
    • Corporate
    • Multipurpose
    • Blog
  • Support
    • WoodMart support
    • Basel support
    • Space support
    • Feature requests
  • Docs
    • WoodMart
    • Basel
    • Hitek, Luman, Antares
  • Image optimizerNew
Login / Register
Checkout
Checkout
Menu

Home / Forums / WoodMart support forum / Trigger the log-in sidebar

Home › Forums › WoodMart support forum › Trigger the log-in sidebar

Trigger the log-in sidebar

  • This topic has 3 replies, 2 voices, and was last updated 1 year, 11 months ago by Luke Nielsen.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • August 27, 2023 at 6:43 pm #491567

    maria_marketing.spt
    Participant

    Hi, is there any way I can trigger the log-in sidebar when a user clicks on a page if he’s not logged in?
    For example, I need a user who clicks a button or a nav menu to open the log-in sidebar only if he’s not logged in. If he/she is logged in then when he clicks the button it just goes to the desired page.
    I tried doing it by using this custom_redirects:
    function custom_redirects() {
    $redirecturl = site_url().’/My-account’;
    if ( is_page( ‘vinde-sneakers’ ) && !is_user_logged_in() ) {
    wp_redirect( $redirecturl );
    die;
    }
    }
    add_action( ‘template_redirect’, ‘custom_redirects’ );

    This works but the problem is that I am not using the Woocommerce registration fields, I have removed them and I am now only using the WCFM registration form for registering new users, so my Account page doesn’t have any registration form on it…. they are separate. That’s why I need to trigger the log-in pop-up/sidebar(because it has both log-in and create an account button that redirects to the registration form page) for this to make sense for my users. Could you please help?

    August 28, 2023 at 12:07 pm #491650

    Luke Nielsen
    Keymaster

    Hello,

    Sorry to say but right now there is no option in Theme Settings available for that. It requires Customization and this is beyond our limitations and support policy scope.

    Hope you can understand our limitations.

    Kind Regards.

    August 28, 2023 at 12:14 pm #491654

    maria_marketing.spt
    Participant

    Hi,
    could you please let me know how to call de log-in sidebar?

    August 29, 2023 at 10:19 am #491875

    Luke Nielsen
    Keymaster

    Hello,

    Open via the custom log-in sidebar, this is possible only with JS, for this, you need to call this code when you need to open the form, otherwise, unfortunately, no way.

    (function($) {
    	$('.login-side-opener').trigger('click');
    })(jQuery);

    Kind Regards

  • Author
    Posts

Tagged: log-in sidebar

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to create new topics. Login / Register
Close

Your request can't be resolved for a long time? Contact our general support manager.

Contact form
WoodMart Image Optimizer
Create your WordPress website.
  • Resources
    • Video tutorials
    • Blog
    • Contact us
    • Refund Policy
    • Terms of Service
  • Social links
    • Facebook
    • Twitter
    • Instagram
    • YouTube
@ XTemos studio. 2025 WordPress development from 2015.

Privacy Policy

  • Home
  • WordPress Themes
    • eCommerce
    • Corporate
    • Multipurpose
    • Blog
  • Support
    • WoodMart support
    • Basel support
    • Space support
    • Feature requests
  • Docs
    • WoodMart
    • Basel
    • Hitek, Luman, Antares
  • Image optimizerNew
  • Login / Register
Sign in
Close

Lost your password?

No account yet?

Create an Account
Sidebar