Maybe someone can help to make related posts with custom posts type? I am stuck with that... Code is here: https://pastebin.com/zRVjuMBn
For example:
We are in current post:
ID | title | cust_category | cust_names | cust_settings
1 | X1 | cat1, cat3 | name8 | set1, set5
And we have customs posts:
ID | title | cust_category | cust_names | cust_settings
2 | X4 | cat1 | name9 | set2
3 | X1 | cat1, cat3 | name9 | set5
4 | X8 | cat12 | name12 | set12
So related posts to current post (ID = 1) will be:
ID 3 and ID 2.
ID3 is the most related, because it has the same values - X1, cat1, set5 (related 3 values).
ID 2 is also related by one value - cat1.
Or you can see this explanation in image: