Skip to content

Instantly share code, notes, and snippets.

@mikezielonka
Forked from Pross/functions.php
Created April 4, 2014 22:58
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 mikezielonka/9984686 to your computer and use it in GitHub Desktop.
Save mikezielonka/9984686 to your computer and use it in GitHub Desktop.
<?php
function remove_post_thumbnail($metadata, $object_id, $meta_key, $single){
if( isset($meta_key) && '_thumbnail_id' === $meta_key && is_single() )
return false;
else
return $metadata;
}
add_filter('get_post_metadata', 'remove_post_thumbnail', true, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment