Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ambrosite

    (@ambrosite)

    That might actually work, but only if you set ‘order_by’ to ‘custom’, which will cause the posts to be sorted by thumbnail ID. If you want to sort by some other value, it would require a hack. I can tell you which lines need to be changed if you want to try it.

    Thread Starter lukehm

    (@lukehm)

    Many Thanks for response
    I’ve pre found list of IDs with thumbnails and used in_posts, sorted alphabetically. Works a treat. However Would love to try the hack.
    ps fabulous plugin
    Best

    Plugin Author ambrosite

    (@ambrosite)

    I haven’t tested this, but I think all you need to do is comment out lines 152 and 153. They look like this:

    if ( $in_same_meta && $r['order_by'] != 'custom' && $r['order_by'] != 'numeric' )
        $in_same_meta_sql = $wpdb->prepare("AND m.meta_value = %s", get_post_meta($post->ID, $in_same_meta, TRUE) );

    Then set your parameters like this (use ‘in_same_meta’ instead of ‘meta_key’):

    'order_by' => 'post_title', // or whatever you want to sort by
    'in_same_meta' => '_thumbnail_id'
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘meta_key exclude thoes without thumbnail’ is closed to new replies.