show site title in widget


I want to show site title along with post title in my widget. now, i can only select title & content NOT site title too.

in line 179 of widget-recent-global-posts.php i found this line, i think a join can do the trick, but i need some help.

$query = "SELECT * FROM " . $wpdb->base_prefix . "site_posts WHERE blog_public = '1' ORDER BY post_published_stamp DESC LIMIT " . $options['recent-global-posts-number'];

  • DavidM

    Hi Hamed.Aghaei and welcome to WPMU DEV!

    That would actually be the query, whereas what you appear to be looking for is the output. And I believe the following should work for your purpose!

    Right after line 102, add the following:
    echo 'Site Name:' . get_blog_details($post['site_id'])->blogname . '<br/>';

    It should be noted that any updates to the plugin will overwrite this change, but then, you can always come back here for the code to re-insert! :slight_smile: