Skip Navigation

[Resolved] Login form

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by Aaron Zame 1 year, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2607713
content-template.JPG

Hi

I've just starting building a new site that requires a my account page (hidden link). If a guess views the my account page then it should display a login form.
I've basically followed these instructions: https://toolset.com/course-lesson/creating-custom-login-forms/#building-a-layout-using-a-login-form but if I view the my account page it displays the page content rather than the login form. If I change the what to display for a single-posts when there is no read permission to show 404, then it will show the 404 page so its only the show content template that isn't working.
I've created this on another site with no issues so i'm not sure what im missing. I've attached an image of my content template with doesn't seem to be working.
Also i've added My Account to the menu and that only show if i'm logged in as admin so the access control part is working.

Cheers
Aaron

#2607785

Hello,

The document you mentioned above is using Toolset content template, please follow our document to check if your theme supports Toolset content template:
https://toolset.com/documentation/programmer-reference/theme-support-for-content-templates/

#2607811

Hi

Yes the theme uses the the_content function. I also tried switching to one of the default WordPress themes but no luck.

#2608033

Here is a sandbox website:
Login URL: hidden link

Detail steps:
1) Create a content template "Guest CT":
hidden link
Display login form shortcode: [wpv-login-form]

2) Creaet a post groups "Logged-in-only", disable "Read" permission to "Guest" user role, and display above content template:
hidden link

3) Create a page "My account":
hidden link
Choose above post groups "Logged-in-only"

Test it in frontend as guest:
hidden link
I can see it works fine, I see the login form correctly, can you reproduce the same problem in above sandbox website?

#2608363

Hi Luo

Thanks for setting up the sandbox site.
I was able to replicate the issue on the sandbox site by changing the theme to Twenty Twenty-three.

On my site I installed the Twenty Twenty-One theme and the login displayed correctly for logged out users. Not sure why it isn't working for recent themes?

#2608369

Hi Luo

I've managed to work out what the problem was. I changed my theme to the parent theme and it worked so I knew there must be an error in my child theme. When I checked to see if the theme was the problem the other day I changed it to the Twenty Twenty-three theme and when that didn't work either I thought it must not be a theme issue.
Anyway I was missing the while have posts loop in my page.php file, so a silly mistake. I'm not sure why it doesn't work with the Twenty Twenty-three theme though.

Thanks for taking time to look at this.

Cheers
Aaron

#2608371

My issue is resolved now. Thank you!