Created
March 30, 2014 01:24
-
-
Save afragen/9865801 to your computer and use it in GitHub Desktop.
Display EDD Ticket downloads only on specific page(s). Modified from @sumobi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function sumobi_edd_downloads_query( $query, $atts ) { | |
global $wp_query; | |
if ( 'insert_page_slug_here' === $wp_query->query_vars['pagename'] ) { | |
$query['meta_key'] = '_tribe_eddticket_for_event'; | |
} | |
return $query; | |
} | |
add_filter( 'edd_downloads_query', 'sumobi_edd_downloads_query', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment