• Resolved girkers

    (@girkers)


    I have only started to use Passkeys myself and was interested in seeing how easy it is to implement in WordPress. With this plug in it is very simple, except I have one small issue.

    Building a test, custom Log In page through an Elementor pop-up, I have the normal log in dialog and I have added the shortcode underneath. However the button doesn’t actually do anything.

    The plugin works fine on the standard WordPress log in page, however on my custom one it does not.

    I know it is not the plug-in, I just want to know what I have done wrong.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mohamed Endisha

    (@endisha)

    @girkers

    The issue is not with the Passkeys plugin — it works fine.

    The reason the button doesn’t do anything on your custom Elementor popup is that the popup content is only added to the page when the popup opens.

    The plugin attaches its internal click listener to the button on page load (DOMContentLoaded). Since the button doesn’t exist yet inside the popup, the listener is never attached, so clicking the button does nothing.

    You need to trigger the plugin initialization after the popup content is rendered. For Elementor, you can add the following JavaScript to the page (for example, in an HTML widget at the bottom of the page).

    Replace id with your popup ID, in your case, it’s 423.

    <script>
    jQuery(document).ready(function($) {
    jQuery(document).on("elementor/popup/show", function (event, id) {
    if (id === 423) {
    setTimeout(() => {
    const domEvent = new Event("DOMContentLoaded", { bubbles: true, cancelable: true });
    document.dispatchEvent(domEvent);
    }, 100);
    }
    });
    });
    </script>

    I’ve tested it in your website console, and it works as expected. You can try it yourself as I did.
    See the result here: https://ibb.co/pBtGH16x

    I hope it works well for you, and I look forward to your positive feedback.

    Thread Starter girkers

    (@girkers)

    Worked a treat, thanks so much.

    Hi, similar issue here using the button under the woo login form works but if i put a shortcode on the same page and hide the one created by the plugin (cause styling and stufff) it doesn’t work for me either i also use elementor.

    Can you maybe, perhaps, if you are willing to, and don’t waste any of your time on it, think about making your awesome plugin more compatible with elementor? But only if you are willing to if not i can live with that!

    also thank you for the moment you took to read this message, i’m sorry if you are going to repeat yourself, or if i wasted your time.

    Plugin Author Mohamed Endisha

    (@endisha)

    @shaady4

    Share with me the link or URL of your website, it might be the same issue mentioned above, so I will try to help you with Elementor.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Shortcode not working for me’ is closed to new replies.