Quantcast
Viewing all articles
Browse latest Browse all 8245

DLOnline on "Stop current post featuring in recent post on single.php"

I am running a custom query for my recent posts, code can bee seen at:
http://pastebin.com/CFZdP3c9

My problem is that it shows my current page post item and I cannot figure out how to pass over it.

originally I tried

global $post;
$currentPost = $post->ID;
 if( $post->ID != $currentPost ) ?>
    (the loop)
endif;

but could not seem to get it to work correctly, it just didn't output anything.

Any insights are greatly appreciated!


Viewing all articles
Browse latest Browse all 8245

Trending Articles