0

I have a custom Portal(web application) outside of WordPress for WordPress Users, In that portal, we need to get the user_id to maintain the records. I need to create a menu in WordPress which redirects to the Custom Portal(web application) with the user_id which logs in to the WordPress site.

I tried to create a menu in the Appearance section, the problem is I can only give the external link(of that portal) but not the user_id. How can I redirect a WordPress user to another custom Portal(web application) with the user_id?

  • Should be relatively easy to accomplish using the `nav_menu_item_args` filter. Identify the relevant link either by its current `href`, or by a specific class you add to the menu item - and then manipulate that href attribute accordingly. – CBroe Jul 05 '23 at 06:29
  • Okay, I will try that, thanks – Ashwani Rai Jul 05 '23 at 11:35
  • There is one more solution that anyone can see if they are facing the same problem, https://stackoverflow.com/questions/2810124/how-can-i-add-a-php-page-to-wordpress?rq=2 – Ashwani Rai Jul 05 '23 at 11:50

0 Answers0