-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How To get Page url in learnPress ? #527
Comments
Hi
But in learnpress, if you be on a lesson page, the
Good luck :) |
Also you can see the function source code here: learnpress/inc/lp-core-functions.php Lines 276 to 310 in 215b328
|
Hello,
I am trying to get current page url. but I am not able to get I tried many ways to get id or url but not succeed
global $post;
echo $post->ID;
global $wp_query;
echo $wp_query->post->ID;
global $wp;
echo home_url( $wp->request )
not able to get id
global $wp;
echo home_url( $wp->request );
global $wp;
echo add_query_arg( $wp->query_vars, home_url() );
global $wp;
echo add_query_arg( $wp->query_vars, home_url( $wp->request ) );
www.host.com/wp-json/lp/v1/lazy-load/course-curriculum
I am getting this url but not getting browser one it should be something like
http:/host.com/courses/cambridge-igcse-physics-paper-2-mcqs-extended/quizzes/4-physics-2021-may-june-23
Please help me to find this solution I am new in wordpress.
Your response will be highly appreciate.
Thank You in advance ^_^
The text was updated successfully, but these errors were encountered: