Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Show the tickets even if the download is hidden
$edd_hide_download = edd_hide_download();
remove_action( 'pre_get_posts', array( $edd_hide_download, 'pre_get_posts' ), 9999 );
function sumobi_edd_hd_custom_pre_get_posts( $query ) {
$edd_hide_download = edd_hide_download();
global $wp_query;
// bail if in the admin
if ( is_admin() )
// bail if the download belong to the tribe_events post type
if ( 'tribe_events' == $wp_query->query_vars['post_type'] )
if( ! $query->is_single )
$query->set( 'post__not_in', $edd_hide_download->get_hidden_downloads() );
add_action( 'pre_get_posts', 'sumobi_edd_hd_custom_pre_get_posts', 9999 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment