use in category.php
-
I have this in category.php
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID, 'cat' => 14 ); $attachments = get_posts($args); if ($attachments) { foreach ( $attachments as $attachment ) { echo apply_filters(
I’m currently doing with a conditional for media category id=15:
if(is_category('my-media-category')) {
but, rather than include cat => 15,
is there a way to get the attachments from whatever post category is current in category.php?my categeory.php template
what if looks like on the site
..pending any fiddling I may do in the mean time.thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘use in category.php’ is closed to new replies.