Using EDD Feature Download for current Tag or Category
-
Hi Pippin,
I am not a coder, so I could not do it well with my idea.
I want to show featured download items in tag. I have active edd feature download plugin and in my homepage, I put code:<h3>Choosen By Us</h3> <?php $args = array( 'post_type' => 'download', 'meta_key' => 'edd_feature_download', ); $featured_downloads = new WP_Query( $args ); if( $featured_downloads->have_posts() ) : ?> <?php while( $featured_downloads->have_posts() ) : $featured_downloads->the_post(); ?> <div class="choose-wrapper"> <a href="<?php the_permalink(); ?>"><img src="<?php my_attachment_image(0, 'thumbnail', 'alt="' . $post->post_title . '"'); ?>"></a> <p><?php if (strlen($post->post_title) > 21) { echo substr(the_title($before = '', $after = '', FALSE), 0, 21) . '...'; } else { the_title(); } ?></p> </div>
It is ok, but in a tag archive, I put this code to archive.php, and add `
‘download_tag’ => ‘ . $download_tag->slug .’,` to show only featured download items for current tag, it is not available.If it is possible, could you please help me to solve it?
Thank you
Liem Pham
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using EDD Feature Download for current Tag or Category’ is closed to new replies.