My head is bleeding from beating it against the wall. Trying to show all the posts that dont have reviews yet on this page http://www.reviewshut.com/category/web-hosting (which is category ID 3) Now the array you see on the top is all the post ID's I want displayed. Only problem is I cant get the format right with query_posts if (is_category('3')) { $notreviewed = unrated_count(); echo implode(",", $notreviewed); query_posts('p=.implode(',', $notreviewed)'); } PHP: Thats what I have now but I tried a ton of different stuff. Any ideas?? The code works if I do query_posts('p=1,2,3,4,5,6'); PHP: But not if I put that array in there. Im sure Im just not formatting the command correctly. Thanks!
$notreviewed = unrated_count(); query_posts( 'p=' . implode(',', is_array($notreviewed) ? $notreviewed : array((string)$notreviewed)) ); PHP:
Your problem then I guess, it's running query_posts('p=1,2,3,4,5,6'); where 1,2,3,4,5,6 are (presumably) the ids of the posts - depends on what unrated_count() returns. Dan.
Feel free to test it, it does what it says on the tin. $notreviewed = range(1, 6, 1); echo( 'p=' . implode(',', is_array($notreviewed) ? $notreviewed : array((string)$notreviewed)) ); PHP: Returns: p=1,2,3,4,5,6 Code (markup): - Which would then be parsed to the function. Assuming query_posts works correctly.