Skip to content

Instantly share code, notes, and snippets.

@ThemeSama
Created July 3, 2015 06:45
Show Gist options
  • Save ThemeSama/a4f921ac23fbb18ee1c2 to your computer and use it in GitHub Desktop.
Save ThemeSama/a4f921ac23fbb18ee1c2 to your computer and use it in GitHub Desktop.
Slupy EDD Tag Page
<?php
/**
* The template for displaying EDD Tag pages
*
* @since Slupy 1.0
*/
get_header();
// if download taxonomy archive, output information about the term
if ( is_tax( 'download_category' ) || is_tax( 'download_tag' ) ) {
$download_term = $wp_query->get_queried_object();
// change the download archive page title based on the taxonomy
if ( 'download_category' === $download_term->taxonomy ) {
$term_type = _x( 'Category Archives: ', 'download category archive page title', 'slupy' );
} elseif ( 'download_tag' === $download_term->taxonomy ) {
$term_type = _x( 'Tag Archives: ', 'download tag archive page title', 'slupy' );
}
?>
<div id="page-header" class="<?php echo ts_get_option('ph_align') ? ' center-items' : ''; ?>">
<div class="container<?php echo ts_get_option('ph_padding') ? ' '.esc_attr( ts_get_option('ph_padding') ) : ''; ?>">
<div class="row">
<div class="col-sm-12<?php echo get_slupy_page_cover(); ?>">
<h1 class="page-header-title">
<?php echo $term_type.$download_term->name; ?>
</h1>
<?php echo !empty( $download_term->description ) ? '<div class="page-header-desc">'. $download_term->description .'</div>' : ''; ?>
</div>
<?php echo get_slupy_page_cover(true); ?>
</div>
</div>
</div><!-- #page-header -->
<?php } ?>
<div id="site-content">
<div class="container">
<div class="row">
<div class="col-sm-12">
<?php
if( function_exists('edd_downloads_query') ) {
$slupy_edd_archive_config = array(
'tags' => $download_term->term_id,
'excerpt' => 'no',
'price' => 'yes'
);
echo edd_downloads_query($slupy_edd_archive_config);
}
?>
</div>
</div>
</div>
</div><!-- #site-content -->
<?php
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment