totallytech Posted February 6, 2013 Share Posted February 6, 2013 Hey Guys, I'm using a script within my wordpress site, but the author is not responding to any questions so I'm hoping someone here could help me out... One gallery I uploaded has 280 images, When viewing the gallery I see the first 20 images and just a simple “More Images” and “Previous Images” links. Is there a way to set it so it displays something like: Images 1-20 of 280 displayed. Results: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Next >> function display_galleries() { //allow plugins to overwrite output $output = apply_filters('ims_before_galleries', '', $this->gallery_tags, $this); if ('' != $output) return $output; extract($this->gallery_tags); global $post, $wp_query; $attach = ( (!empty($this->opts['attchlink']) && empty($this->meta['_to_attach'][0])) || !empty($this->meta['_to_attach'][0])); if (!empty($post->post_excerpt) && $this->in_array($this->imspage, array('photos', 'slideshow'))) $output = '<div class="ims-excerpt">' . $post->post_excerpt . '</div>'; $output .= "<{$gallerytag} id='ims-gallery-" . $this->galid . "' class='ims-gallery' itemscope itemtype='http://schema.org/ImageGallery'>"; foreach ($this->attachments as $image) { $title = get_the_title($image->ID); if (!empty($image->post_parent)) { $title = get_the_title($image->post_parent); $link = get_permalink($image->post_parent); } elseif ($attach) { $link = get_permalink($image->ID); } else { $image->meta['class'] = 'photo ims-colorbox'; $link = $this->get_image_url($image->ID); } $image->meta += array( 'link' => $link, 'alt' => $title, 'caption' => $title, 'title' => $title); $output .= $this->image_tag( $image->ID, $image->meta ); } $output .= "</{$gallerytag}>"; $wp_query->is_single = false; $output .= '<div class="ims-navigation">'; $output .= '<div class="nav-previous">' . get_previous_posts_link(__('<span class="meta-nav">←</span> Previous images', 'ims')) . '</div>'; $output .= '<div class="nav-next">' . get_next_posts_link(__('More images <span class="meta-nav">→</span>', 'ims')) . '</div>'; $output .= '</div><div class="ims-cl"></div>'; $wp_query->post_count = 1; $wp_query->is_single = true; $this->visited_gallery(); //register visit return $output; } I believe that is the code that actually writes the pagination area, I'm happy to post any other code if needed. Can anyone help me out please? Link to comment https://forums.phpfreaks.com/topic/274084-pagination-troubles/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.