get_permalink() returns false for every post listing
I am using get_permalink() function under a buddypress page “courses”, where i am fetching posts using this code
$course = get_post($course_id); $course_link = get_permalink($course_id);
I am using buddyboss theme and boss for learndash plugin to list courses assigned to members.
Problem is i am not getting permalink in $course_link. $course_id is post id (integer), i have tried all the ways to get permalink but it always returns false. I need help to know why this is happening and what is the solution for this problem.
- You must be logged in to reply to this topic.