Skip Navigation

[Resolved] change the login in the main navigation so that when a person logs in from any page

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Tagged: 

This topic contains 15 replies, has 2 voices.

Last updated by Jas 5 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1154473

Jas

Then how do we also change the login in the main navigation so that when a person logs in from any page, they automatically are re-directed back to that page. Currently they are re-directed to the wp-admin, and I definately don't want subscribers to be taken there.

Thanks so much Lou Yang!!!! Appreciate this help!

#1154481

Hi,

It depends on how do you setup the "login" link in main navigation, if you can setup it with shortcodes, you can try the similar codes, for example:

<a href="<em><u>hidden link</u></em> id='$current_page']">Login</a>
#1154507

Jas
login 2.png
login.png

I set it up under Appearances>menus. (is there another way?) then added regular login as per second screenshot below which doesn't give option for URL, but if I add custom link, Can I add it here somehow? please see screenshot2. but your shortcode didn't work here...

#1154541
menus.JPG

I have tried these in your website:
1) Login your website
2) Dashboard-> Appearance-> Menus, but can not find the screenshot you mentioned above, here is what I see:
menus.JPG

Can you check it?

#1154604

Jas
menu login.png

looks like you need to change the selection under "select a menu to edit". almost at very top of that same page:)

#1154614

Thanks the details, as you can see this menu item settings does not support shortcode, so in your case, you might consider custom codes for it. for example:
https://wordpress.stackexchange.com/questions/169704/redirect-to-referring-page-after-logging-in

For your reference.

#1155980

Jas

Ok but there must be a workaround for this that doesn't use CSS? Being that Toolset is dedicated to non coders and membership sites are kindof what Toolset is about? Obviously to have a membership site, one has to be able to register/ login from front end without being taken to wp dashboard? It wouldn't make sense otherwise?
Referencing the https://toolset.com/documentation/user-guides/building-the-my-account-page/, shouldn't I be able to add the my account page link to my main menu/navigation and when user clicks it that's not logged in, have it take them to the Create account page that the documentation talks about? Why doesn't that work?
Thanks so much for your patience Lou Yang! I've almost got this fully set up but am stumped what to do on this last couple of issues!

#1155997

Jas

....continuing from my last reply, I can access my accounts page just looking up hidden link directly, and I then get a login with the login content template I created, but I can't seem to have that page link show up in the navigation menu even though I've added it to the menu, (dashboard>appearance>menu) but it won't show up on the site.

(and then, when I log in, this way it does redirect back to home page opposed to dashboard, but I still see the WordPress menu above where I can then go to a wp dashboard)

#1156026

As you can see, your menu settings can not pass URL parameter "redirect_to" to login page, so after login, the user won't be able to redirect to previous page/post, there isn't such a built-in feature within Views plugin, see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-login-form

So it needs custom PHP codes(not CSS codes).

Since the login menu item is setup by other plugin/theme, see your own screenshot:
hidden link
I suggest you check it with the author of that specific plugin/theme, check if it is possible to pass URL parameter "redirect_to" to login page.

For your new question:
Q1) but I can't seem to have that page link show up in the navigation menu even though I've added it to the menu, (dashboard>appearance>menu) but it won't show up on the site.

Please try this: dashboard>appearance>menu
hidden link

edit the item "My account", it is using option "Logged Out Users", that options is not a wordpress built-in feature or Toolset feature, it should be from other plugins/theme, I suggest you check the author of that specific plugin/theme

Q2) when I log in, this way it does redirect back to home page opposed to dashboard
Please check this:
hidden link

You are using below shortcode:

<p>{!{wpv-login-form redirect_url='<em><u>hidden link</u></em>'}!}</p>

The attribute "redirect_url" value is your home page hidden link, so it will be redirected to your home, page, if you want to redirect to another URL, please change it.

#1156035

Jas

in the dashboard>appearance>menu I unclicked "logged OUt User" but it still doesn't cause the link to show up in the main nav...:( Which doesn't make sense to me, as I've had My Account in main nav before just fine,,,

#1156037

That menu item "My account" is not created by Toolset plugins, I don't think it is related with Toolset plugins.

I suggest you try to locate the problem source, for example:
In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2017, and test again
You might need to setup the main nav, create the "My account" item and test again.

#1156056

Jas

The page "My Account" I created with Toolset plugins,following the documentation
https://toolset.com/documentation/user-guides/building-the-my-account-page/

But maybe after I've fully designed the my account page with this documentation, where I set post group to "only logged in users" for My Account, then it won't show that link also until someone logs in, and then maybe that login link can only be through the standard login to access? I thought if I added the page "My Account" to the nav menu, that the link would still show for that page, and when a non-logged in user tried to access it, it would instead give me the login that way.

#1156078
My-account-toolset2.JPG
My-account-toolset1.JPG

I have checked your website again,
1) dashboard>appearance>menu
Since there are two items with same name "login"
I have renamed the item of "My account toolset"

2) Logout as an visitor, test it in front-end, it works fine, it does not display the item "My account toolset", see screenshot:
My-account-toolset1.JPG

3) Login, and test again, it does display the item "My account toolset", see screenshot My-account-toolset2.JPG

The Access settings do work in your website:
https://toolset.com/documentation/user-guides/building-the-my-account-page/#hiding-the-my-account-page-from-visitors

Can you confirm it?

#1157518

Jas

I realize that Lou Yang, that is my whole problem. I NEED IT TO SHOW the "My accounts" page to guests, NOT to hide it from them. More specifically, I need it to show the part of the "my accounts" page that is a full complete login form.

I'm afraid you are not understanding me. Please forget everything we've talked about so far, and think of this. When a brand new guest user comes onto my site (or any other membership site I've ever seen), and decides to become a member, that person needs to be able to click a login, or My account menu item or some other similar link and have it take them to a login form that INCLUDES links to both "create new user" or "forgot password". I don't care what the link is called, it just needs to open to a complete login that allows for registration.

I've read the documentation about 25 times. The only step that I can see where I feel maybe I misunderstood was the:
"Building a layout using a login form-Displaying a login form to visitors" Step of the page: https://toolset.com/documentation/user-guides/building-the-my-account-page/#hiding-the-my-account-page-from-visitors

It says: Navigate to Layouts.
2. Click Add new.

I don't know anything about layouts, but I've assumed that I was to be building a Content Template here. Was I wrong? And then later I've added the content template to the Post Group "logged in users only" in the errors under Guest user (which is unchecked, but then I went into edit mode to add the content template "Login Template".)

This is the only step where I can think I might have made a mistake.

Please please help! I've been working on this for a very very long time now and I just can't make it happen.

#1157556
post-group.JPG

If you want to show "My accounts" page to guests, you just need to edit it:
hidden link

in section "Post group", change it to "No Post Group selected", see screenshot post-group.JPG

And in the this page content, you can use Access shortcode [toolset_access] to display different content for different user role, see our document:
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/

If you need more assistance for that shortcode [toolset_access], new ticket please, thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.