Skip to content

Instantly share code, notes, and snippets.

@afragen
Created March 30, 2014 01:24
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 afragen/9865801 to your computer and use it in GitHub Desktop.
Save afragen/9865801 to your computer and use it in GitHub Desktop.
Display EDD Ticket downloads only on specific page(s). Modified from @sumobi
<?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