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
The plugin gets the URL directly from the WordPress core, using the get_the_title($id) call. That should return the correct URLs in all cases. I did some research, and found this topic regarding Learnpress: https://wordpress.org/support/topic/lessons-url-from-search-results-is-not-working/
It’s a pretty similar issue, appears to be a bug in their plugin, but as a result of a limitation. From what I can see the developer explains that the lesson URLs are meant not to be working outside a course context, for some reason. I believe that is going to be the reason why the incorrect URL is returned.
Even a bigger issue is that Ajax Search Pro cannot control post type links on the search results page, that is automatically parsed by them theme based on the post object ID (lesson ID). So even if there is a way to get the correct URLs, it has to be somehow edited into the search.php file in the theme directory, or maybe using the ‘post_type_link’ filter, but I’m not sure if those apply on that page.
The live search result URLs can be changed very simply, but the results page is theme related territory unfortunately.Best,
If you like my products, don't forget to rate them on codecanyon :)