Reply To: Incorrect URLs for Learnpress Lessons in Search Results

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

#12891
Ernest Marcinko
Ernest Marcinko
Keymaster

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:

$l = new LP_Lesson( get_the_ID() );

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:

$l->post->guid

or maybe

$l->_item->guid

..should have an effect, or may even work, I’m not sure.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)