Get login information from wordpress

May 29, 2020

Hello

I am working in a wordpress environment (Learndash) and would like to get the userid etc from wordpress to include in an articulate file. So, ideally, I would like to get JS to get the information (unless there is a simpler way). Does anyone know how to do that?

Thanks for your help

Andrew

4 Replies
Sam Hill

Hi Andrew, yes you would need to have some understanding of WordPress in order to make this possible. There is a method for making JavaScript variables available to applications via the functions.php file of your project.

Maybe Learndash provides this information through an API though? It might be worth first contacting LearnDash and asking "Do you provide a JavaScript API to get any user information such as ID". If they do, then the method to access this and load into your course will be relatively simple.

The WordPress method is a bit more involved, and you'd definitely need somebody who is comfortable working with the functions.php file in WordPress in order to get that data for you.

This discussion is closed. You can start a new discussion or contact Articulate Support.