So I am trying to list posts that have a parentID embedded in them. This parentID is a custom field in the post. I just want to list posts that have the same parentID as the current post so it displays in that post.
This is what I have so far for the code, i've placed this in single.php (my post template).
Now I am not good at all with php so I know there are a lot of mistakes in this code. I simply want you guys to help me fix this code so I can use it. Currently when I try to use it, it doesn't work since it shows nothing. Without the IF statement, it shows the posts, but they are displayed everywhere and are not specific to the parent post. Please someone help fix this.