WordPress.org

Support

Support » Plugins and Hacks » Diamond MultiSite Widgets » [Plugin: Diamond MultiSite] It only shows the FIRST post?!

[Plugin: Diamond MultiSite] It only shows the FIRST post?!

  • I just installed Diamond MultiSite Widgets for our WordPress MU Network and I’m using the Recent Posts Widget.

    But: It only displays the very FIRST post of each blog instead of displaying the latest post. How is that even possible?

    Anyone? o_O

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve changed the file permissions, too – no difference.

    You wouldn’t believe it, but that’s EXACTLY the functionality I’m looking for! If you’ve managed to troubleshoot it by now, can you post some details so I can replicate that behavior?

    I had this same problem. I just figured out that if, under:

    Maximum post per blog (0 for unlimited):

    If you select ‘0’ it displays the most recent.

    If, however you select 1, 2, etc. it displays the first post from each blog. This really goofs me up, because I need the most recent posts (1 only) from each of l0 selected blogs.

    Anyone have any ideas, or is this just a bug?

    There is solution, just add ORDER BY post_date_gmt desc to mysql queries:

    120                 $blog_list = get_blog_list( 0, 'all' );
    121                 if (($white == 0 && !in_array(1, $wgt_miss)) || ($white == 1 && in_array(1, $wgt_white))) {
    122                         $sqlstr = "(SELECT 1 as blog_id, id, post_date_gmt from ".$table_prefix ."posts where post_status = 'publish' and post_type = 'post' and post_title <> '".__('Hello world!')."' ORDER BY post_date_gmt desc ".$limitstr.")";
    123                 }
    124                 $uni = '';
    125
    126                 foreach ($blog_list AS $blog) {
    127                         if (($white == 0 && !in_array($blog['blog_id'], $wgt_miss) && $blog['blog_id'] != 1) ||
    128                         ($white == 1 && $blog['blog_id'] != 1 && in_array($blog['blog_id'], $wgt_white))) {
    129                                 if ($sqlstr != '')
    130                                         $uni = ' union ';;
    131                                 $sqlstr .= $uni . " (SELECT ".$blog['blog_id']." as blog_id, id, post_date_gmt from ".$table_prefix .$blog['blog_id']."_posts  where post_status = 'publish' and post_type = 'post' and post_title <> '".__('Hello world!')."' ORDER BY post_date_gmt desc ".$limitstr.")";
    132                         }
    133                 }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Diamond MultiSite] It only shows the FIRST post?!’ is closed to new replies.
Skip to toolbar