WordPress.org

Ready to get started?Download WordPress

Forums

Global Posts Ordering - can't get it to work (2 posts)

  1. veevee
    Member
    Posted 2 years ago #

    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++;
    						}
    					}
    				?>
  2. nonverbla
    Member
    Posted 2 years ago #

    Hi vevee, it doesn't work with images, of course.

Topic Closed

This topic has been closed to new replies.

About this Topic