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

This topic contains 5 replies, has 2 voices, and was last updated by bayleafdigital bayleafdigital 5 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12062
    bayleafdigital
    bayleafdigital
    Participant

    site password is f^aEkOfsG8VmeGug

    please note that you will need to use sftp to connect to the site, and port 8789

    Problem description:
    We use a custom plugin called BLD knowledge base to post articles on the site. This plugin creates a custom post type. We would like to include related posts pro at the bottom of the post type. When a shortcode is inserted into the text area, the related posts don’t show. See attachment for more details on what we have tried.

    Attachments:
    You must be logged in to view attached files.
    #12072
    Ernest Marcinko
    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 :)


    #12074
    bayleafdigital
    bayleafdigital
    Participant

    Many thanks Ernest! I appreciate your help. We need to make these changes on two websites that are in production. Can you please advice what configuration changes you had to make to get the related posts to show?

    Or, are we able to copy these plugin files into other wp installations and get the full extent of the changes you made?

    Abhi

    #12081
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Abhi,

    If you copy the wp-content/plugins/related-posts-pro/ folder over to the live, it should do the trick. It contains all the changes.

    Best,
    Ernest Marcinko

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


    #12117
    bayleafdigital
    bayleafdigital
    Participant

    Thanks Ernest!

    #13519
    bayleafdigital
    bayleafdigital
    Participant

    Hi Ernest, We are not able to use this customization because we are required to be on the latest versions of all plugins. Would it be possible for you to include this change in an upcoming release? I will be happy to pay you to speed up the inclusion.

    Many thanks in advance,

    Abhi

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.