Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Incorrect URLs for Learnpress Lessons in Search Results › Reply To: Incorrect URLs for Learnpress Lessons in Search Results
Addition:
I’ve taken a very quick look at their plugin source, and the LP_Lesson class found in learnpress/inc/lesson/class-lp-lesson.php seems to be the one responsible for lesson object management. I’m not sure if this is helpful, but I believe it is possible to use it like this in the theme files:
[php]$l = new LP_Lesson( get_the_ID() );[/php]
Now the $l variable holds the lesson post type object, and it has a ‘guid’ property, which might be the correct URL. So changing the result anchor link to:
[php]$l->post->guid[/php]
or maybe
[php]$l->_item->guid[/php]
..should have an effect, or may even work, I’m not sure.