Reply To: Related posts pro not working with a custom post type

Home Forums Product Support Forums Related Posts Pro for WordPress Support Related posts pro not working with a custom post type Reply To: Related posts pro not working with a custom post type

#12072

Ernest Marcinko
Keymaster

Hi,

This one was a though one to figure out, but I found a solution.

After debugging for some time I realized that the page where the plugin shortcode is placed is not actually a post type object (post, page etc..) but a custom page displayed via the slug – so there is no global post object which Related Posts Pro could use as a reference.
This means that the plugin is not able to get the current post (as it does not exist) and check for related items, and immediately exits. Since now I have not thought about such usage of the plugin, so it was not able to handle it.

I've made a few changes in the plugin configuration, as well as in the plugin code to try getting random items from the database when no post content is found. It's only a temporary solution for now, I will note this one as a possible bug, and I will come up with a fix for the upcoming release.

Best,
Ernest Marcinko

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