Forum Replies Created

Viewing 1 replies (of 1 total)
  • FYI:

    I set “First image on post” to “Thumbnail source”, but it seems to be different behavior in some cases at ver.2.3.0. I doubt ‘orderby’ => ‘menu_order’ in your source code. It seems that ‘menu_order’ does not necessarily always shows the first image of posts. (Reference: Codex about WP_Query)

    So, I changed it as shown below.

    $ diff wordpress-popular-posts.php.org wordpress-popular-posts.php
    1137c1137,1138
    <                               $attachments = get_children(array('post_parent' => $id, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order'));
    ---
    >                               //$attachments = get_children(array('post_parent' => $id, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order'));
    >                               $attachments = get_children(array('post_parent' => $id, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'meta_value', 'order' => 'ASC'));
Viewing 1 replies (of 1 total)