bigskydj09
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Fixing WordPress
In reply to: attachment.php template and flexslider—linking to specific imageResolved: The answer was to assign a count to each attachment:
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID, 'order_by' => 'menu_order', 'order' => 'DESC' ); $attachments = get_posts( $args ); if ( $attachments ) { $count = 0; foreach ($attachments as $attachment) { $link = get_permalink($attachment->ID); $link = add_query_arg('img',$count,$link); echo '<div class="thumbnail">'; echo '<a href="'.$link.'" >'; echo wp_get_attachment_image( $attachment->ID, 'small' ); echo '</a>'; echo '</div>'; $count++; } }
And then link up with that on attachment page.
Forum: Plugins
In reply to: Pull all post/page images for slider?It turns out the images HAVE TO BE ATTACHED…which is to say, they cannot be hyperlinked. Other than that, the code is sound.
Forum: Plugins
In reply to: Drop-down previous_posts_link/next_posts_link in global navigationOk, so I got the whole deal working! However, the drop-down menu stays, well, dropped-down while navigating my blog as well. Here is the kicker though: it only stays dropped for the first page of the blog. When I navigate to page 2, page 3, and so on, it disappears (as it should). Any ideas?!
<?php wp_list_categories('include=11&title_li='); ?> <?php if ( in_category( 'collaborations' ) || is_single('collaborations')) { ?> <ul class="child"> <?php previous_post_link_plus( array('link' => 'Previous', 'format' => '%link', 'loop' => true, 'in_same_cat' => true) ); ?> || <?php next_post_link_plus( array('link' => 'Next', 'format' => '%link', 'loop' => true, 'in_same_cat' => true) ); ?> </ul> <?php } ?>
PS…I am using the link plus plugin, thus the code “post_link_plus”
Thanks in advance!
Forum: Plugins
In reply to: Drop-down previous_posts_link/next_posts_link in global navigationSorry, code link below:
Viewing 4 replies - 1 through 4 (of 4 total)