Support » How-To and Troubleshooting » Listing Posts with code not working!

Listing Posts with code not working!

Viewing 9 replies - 1 through 9 (of 9 total)
  • maybe something like this (not tested)

    Hello brasofilo, not sure whats wrong but I have put the code into the template but I am not getting any output. Could this be because of the Custom Field, I am not currently sure. But there is no output.

    in my code, the condition should be
    if ($thePostID == $parentID2)

    being the $thePostID the variable that you set in your original code

    (I’ve tested and it works)

    Sorry for bothering you but I’ve added that in and it still does not show anything.

    Here is the pastebin link: http://pastebin.com/YvmCYZNr

    Thats the new code, that I am currently using which is not working for me 🙁

    It would be better to see the full code…
    but at a first sight the $thePostID = $post->ID; should be inside the loop

    here’s how I have it working in Twentyeleven single.php

    I’m not using the category in the query as my test site only have one…
    re-check your category ID as well

    How did you get the custom post field for those posts?

    Also could you maybe contact me on MSN ? my msn is: faeronsayn@hotmail.com

    This is the code that works, but displays all posts in the category, and does not make use of the post parent ID checking through IF statement.


    Any other code I try no posts show up. So please if you could possibly add me on MSN, I am sure it would be much easier, since i’ll be able to explain this to you in greater detail.

    sorry, i don’t have msn

    follow the full code I posted and you should get it working

    I still can’t get this to work. Hoping someone else could also help me.

    Just wondering.

    The code that was provided above, how can it be adapted to look through custom post type posts ?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Listing Posts with code not working!’ is closed to new replies.
Skip to toolbar