Skip to content

Instantly share code, notes, and snippets.

@erezLieberman
Created February 26, 2014 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erezLieberman/9231996 to your computer and use it in GitHub Desktop.
Save erezLieberman/9231996 to your computer and use it in GitHub Desktop.
EXCLUDE CURRENT POST FROM WP QUERY
$currentID = get_the_ID();
$args = array (
'post__not_in' => array($currentID)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment