how should I get only parent posts of custom post type projects prev/next posts (good would be if possible to make it recursively)

for example I have 3 parent posts and some with childs

post 1 
    child 1
    child 2
post 2
    child 3
    child 4
    child 5
post 3

and i want that all 3 (maybe more) posts would be turning recursively

PS. I have current post ID, if it helps

Read more here: get next/prev only parent posts


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: