1

In the Wordpress Menus Custom Links, I want to create a page called "My Page", and when the Current User clicks this Custom Link, it takes him to his specific page.

E.g mydomain.com/%CURRENT USERNAME% / mydomain.com/johnsmith

Reading other posts, it appears that the Wordpress Custom Link understands only a static URL, not a dynamic one.

Therefore I need some way for the system to "get" the current user info, and redirect accordingly.

I have viewed the replies at this previous thread and here but I am still lost. My coding ability is even less than the first guy's (but I do try!), so I can understand the theory, but I don't understand the technical language.

Therefore, I understand "You need to place this code, in your Theme Functions/in the script of the page". But I don't understand "You need to run a jQuery with this code"

  1. What information can I enter in the Custom Link to achieve this?
  2. What code do I need to enter in the back-end to read this information correctly?

Thank you very much.

7
  • It might be easier to add a manualy coded link into your menu before or after the wordpress generated menu. Usually a "my acccount" kind of link sits outside of the main nav anyways. Could this work for you? Or does it have to sit within a main menu? Because the correct way to do such a link properly requires delving into "walkers" and they are not a lot of fun. Commented Apr 29, 2016 at 9:27
  • Thanks for the reply, Simon. Commented Apr 30, 2016 at 5:25
  • Thanks for the reply, @SimonPollard Ideally, this would sit within a main menu, so that user can view page X, page Y, and then easily click back to "My Page". But I prefer doing things the correct way, I just don't know enough in order to know that there is another way. So manually coded would be fine for me, but I would just need real baby step instructions about exactly where to place the code. (For example, I don't know what a "walker" is, but I'm happy to learn). Thanks Commented Apr 30, 2016 at 5:36
  • Hi - are you still after help with this? Commented May 3, 2016 at 8:11
  • Hello, yes please. I am still after help for this. Commented May 8, 2016 at 1:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.