• Resolved Abdul Azij

    (@viraltui)


    i have successfully setup One tap Sign in with Google+Sign in with Google button on all pages.

    it’s working fine as expected.

    however, i have a custom page template, in which One tap Sign in with Google isn’t showing up. but if i changes to default template it shows up.

    context of the template is that, if a visitor is logged in then they are told to update their profile (my site users). for non-logged-in user they see messages to login/image with loging/registration url linked.

    Most importantly i used Gemini to create/debug the custom template, and there is possibility that do not keep traditional WordPress header/footer from Astra theme. even though my template has these code:

    and end with:

    <?php
    // Template Name: Update Contact Info

    get_header();

    if (!is_user_logged_in()) {
    // Display login prompt and message for non-logged-in users

    // messages+other necessary codes

    get_footer();
    ?>

    what is the problem?

    could it be that site kit plugins isn’t loading on that custom template/ page?

    • This topic was modified 1 month, 2 weeks ago by Abdul Azij. Reason: add details where not working

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

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Support Adam Dunnage

    (@adamdunnage)

    Hello @viraltui, thank you for opening a support topic for your issue you’re facing with Sign in with Google and one tap.

    Can I first check with you if you are including?wp_footer()?in your template file? As you have used Gemini to create your custom template, it’s possible that it might be missing that function.

    Generally we would expect it to be output right before the?</body>?tag, like you can see below:

    <?php wp_footer(); ?> </body>

    If you have any questions on the above or any more insights to share on this then please share them here.

    Thread Starter Abdul Azij

    (@viraltui)

    you said:

    including wp_footer() in your template file

    i am assuming that you meant on Page Template. Not the main Theme (Astra with child them) as they aren’t relevant in this problem. for better context here is it: “Astra Child Theme: Update Contact Info Page Template (update-profile-contact-info.php)” this file.

    and for, wp_footer() no my page template has this line: get_header(); at top and get_footer(); in bottom.

    replacing get_footer with wp_footer gives fatal errors to those page that use this template.

    Remember i am talking about the page custom template not WordPress Themes like (Astra or generatepress)

    template file? As you have used Gemini to create your custom template

    • This reply was modified 1 month, 2 weeks ago by Abdul Azij.
    • This reply was modified 1 month, 2 weeks ago by Abdul Azij.
    Plugin Support Adam Dunnage

    (@adamdunnage)

    @viraltui Yes that’s correct, I was referring to your custom page template, sorry if that was not immediately clear. I wasn’t asking you previously to?replace?get_footer()?with?wp_footer()?, just that?wp_footer()?is what will output Sign in with Google scripts so I’d expect that to be in the custom page template that you generated.

    Without seeing your theme files, templates, configs etc. it is difficult to troubleshoot the issue. There could be a number of issues due to this being AI generated or it could simply be what I have highlighted above.

    It does sound like an issue with your template file so I’d suggest checking this in more depth if possible. We are limited on the support we can offer with this as we don’t have direct access to your files.

    Let me know if you have any other questions or if you find anything else useful in your troubleshooting.

    Thread Starter Abdul Azij

    (@viraltui)

    okay, since I am assuming that on custom page template, not all plugins/theme file loads. it’s possible that we can load site kit necessary (required file) to load on that theme? example this code block:

     // Display  message for non-logged-in users
    // Construct the correct URL for the JavaScript file
    $plugin_js_path = site_url('/wp-content/plugins/login-codez/assets/js/login-images.js');
    // Output the script tag with the correct URL
    echo '<script src="' . esc_url($plugin_js_path) . '"></script>';

    in here i load my custom plugins js files using this.

    is there any way to load site kit on those pages (which use custom templates)

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @viraltui Unfortunately there isn’t anything I can provide for you to do this. Site Kit will output Sign in with Google code only via the?wp_footer?hook. As the issue is with your template and not on the Site Kit side, we are limited in the support we can provide.

    It may be worth trying another template or seeking some further assistance with your current custom template. If you do have any issues on the Site Kit side or any questions then I’d be glad to help you with those.

    You may be able to get some help with your custom these in the fixing WordPress forum.

    Thread Starter Abdul Azij

    (@viraltui)

    sorry for the late reply.

    while i stopped looking for a solution as nothing worked.

    today i was testing something on my site.

    So basically, only all the posts (apart from the wp-login page, which always showed) has one tap sign is featured on.

    All of pages they don’t have that. I tried this on multiple devices and Results are the same.

    No Pages show one tap. while Post shows.

    i created brand new page and post, as well as used Post Type Switcher Plugin to switch types, in vice-versa.

    So final Results are:

    Post type:

    Page: no one tap

    Post: shows one tap

    What Should I do?

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @viraltui Thanks for the update. I suspect this is again due to your custom template as when testing this myself, I am seeing the one tap sign in options on both pages and posts. Have you since tried using a different template on your site or had some help looking at the template?

    Thread Starter Abdul Azij

    (@viraltui)

    no, i used default page template.

    Astra default page template.

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @viraltui Thanks for confirming. I can recreate this when using the Astra default WordPress theme. I will perform some further tests on this and get back to you when I have more information.

    Thread Starter Abdul Azij

    (@viraltui)

    okay, thank you for your response.

    i will wait for your results.

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @viraltui Could I check with you that you’re still seeing the prompt on posts but not pages? And if you switch from the Astra theme to another default WordPress theme is the behaviour the same? If you could also share a recording of this behaviour that would be very helpful indeed.

    Thread Starter Abdul Azij

    (@viraltui)

    i can confirm that,

    twenty twenty five or default theme did show one tap login on Pages.

    Could it be related to Astra Theme?

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @viraltui Could you please share your?Site Health information. You can?use this form?to share privately if preferred.?With this I can take a look at your setup to see if anything here stands out.

    Could you also share a recording of this behaviour on your site. You can use a service such as Loom to capture your recording and share it here or via the private form above. This would be very helpful to us in seeing this in real time.

    I have performed some testing with the Astra theme and have not found any issues with it and one tap at the moment so it doesn’t look specific to the theme. The information above will be very helpful in hellping us to identify a cause. Let me know if you have any questions about the above.

    Thread Starter Abdul Azij

    (@viraltui)

    i have shared and filled out form.

    sorry couldn’t attach a video. i am out of my home for few days, for personal work.

    i can provide screen record, after i get back home. if still necessary.

    i will try to deactivate my custom plugins to check if it’s making this problems.

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @viraltui Yes if you could check your custom plugins that would be good to know if these were causing the issue. I can see you have one of your own plugins active on your site. Is this plugin perhaps inserting custom code to pages on your site that could be affecting the one tap prompt displaying? You can try disabling this plugin to see if this is the case. You can also try this with other plugins you have active to ensure there isn’t a plugin conflict causing this.

    I will continue to investigate on my side and if I find anything I will let you know here.

Viewing 15 replies - 1 through 15 (of 24 total)
  • You must be logged in to reply to this topic.