Support » Plugin: WordPress MU Sitewide Tags Pages » Showing image attachments from sub site posts

  • Resolved jw60610



    Using the Sitewide Tags plugin I am trying to show, on the main site, the first four images of posts from both the main site and more importantly the sub-sites.

    I’m using get_children() using the following arguments:

    $images = new WP_Query( array(
    'post_parent' => get_the_ID(),
     'post_status' => 'inherit',
     'post_type' => 'attachment',
    'post_mime_type' => 'image',
     'order' => 'ASC',
     'orderby' => 'menu_order ID',
    'posts_per_page' => 4,
     'post__not_in' => array($thumb_id),
     'update_post_term_cache' => false,
    ) );


    foreach ($images->posts as $image) {
    echo '<div class="gallery-image"><a href="'.get_permalink($image->ID).'">'.wp_get_attachment_image( $image->ID, 'gallery-overview-thumb' ).'</a></div>';

    in the loop.

    Everything works fine in posts from the main site, but on posts from any sub site, the images do not show.

    Obviously the issue relates to how Sitewide Tags displays attachments from sub sites, but I’m lost as to a solution.

    Any help is appreciated. Thanks so much.


Viewing 1 replies (of 1 total)
  • Plugin Author Ron Rennick


    MultiSite Guru

    SWT does not copy the images with the posts. It stores a copy of the thumbnail html.

    You could write a plugin that caches the result of that query and saves it with/attaches it to the SWT post.

Viewing 1 replies (of 1 total)
  • The topic ‘Showing image attachments from sub site posts’ is closed to new replies.