Support

Account

Home Forums Add-ons Gallery Field “Reverse Lookup” via Attachment Custom Field Reply To: “Reverse Lookup” via Attachment Custom Field

  • Ugh…sorry. Had that and still no go:

    
      $args = array(
          'fields' => 'ids',
          'posts_per_page'    => 1,
          'post_type'      => 'attachment',
          'post_status' => 'any',
          'meta_query'    => array(
        		array(
        			'key'	 	=> 'image_meta_image_id',
        			'value'	  	=> $image_meta_image_id
        		)
        	)
      );
      $attachment_query = new WP_Query( $args );
      $attachments = $attachment_query->posts();