Title: Global Posts Ordering &#8211; can&#039;t get it to work
Last modified: August 20, 2016

---

# Global Posts Ordering – can't get it to work

 *  [veevee](https://wordpress.org/support/users/veevee/)
 * (@veevee)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/global-posts-ordering/)
 * I’m having problems getting the Global Posts Ordering plugin to work. I set up
   the functions file correctly, and I think I’m using get posts according to the
   plugin directions. The only thing I can think of is that I’m using additional
   code in my loop to parse get_posts and only return the image attachments, but
   that shouldn’t affect the order that the posts are returned right?
 * It’s a nice plugin with a nice looking interface, I’d love to get it working.
   Any help would be appreciated. Thanks!
 * Here’s the part of my loop where I call get_posts
 *     ```
       <?php
       	$args = array(
       		'order' => 'ASC',
       		'orderby' => 'menu_order',
       		'post_parent' => $post->ID,
       		'post_status' => 'inherit',
       		'post_type' => 'attachment',
       		'post_mime_type' => 'image'
       	);
       		$images = get_posts($args);
       			if ($images) {
       				$count = 1;
       					foreach ( $images as $id => $image ) {
       					if( $count === 1 ) {
       					if ( !in_category( _x('link', 'link', 'twentyten') ) ) {
       						$img = wp_get_attachment_thumb_url( $image->ID );
       						//$link = get_permalink( $post->ID );
       						$link = wp_get_attachment_url($image->ID);
       						$title = get_the_title();
       						print "\n\n" . '<div id="intcont" class="alignleft"><a href="' . $link . '" rel="lightbox[reed]" title="' . $title . '"><img src="' . $img . '" alt="" /></a></div>';
   
       								};
       							}
       							$count++;
       						}
       					}
       				?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [Rasso Hilber](https://wordpress.org/support/users/nonverbla/)
 * (@nonverbla)
 * [14 years ago](https://wordpress.org/support/topic/global-posts-ordering/#post-2646854)
 * Hi vevee, it doesn’t work with images, of course.

Viewing 1 replies (of 1 total)

The topic ‘Global Posts Ordering – can't get it to work’ is closed to new replies.

## Tags

 * [get_posts](https://wordpress.org/support/topic-tag/get_posts/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 1 reply
 * 2 participants
 * Last reply from: [Rasso Hilber](https://wordpress.org/support/users/nonverbla/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/global-posts-ordering/#post-2646854)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
