• Hello,

    I am looking to use the ‘Link’ theme on my multisite installation as the theme for the main site as well as some of the subdomain sites. The theme has a built-in featured posts slider that appears to be broken by the multisite.

    I have some familiarity with the query tags for posts but I’m not sure how they differ with multisite. I’d like to repair the code so the slider on the main site shows featured posts from the main site (although a neat possibility would be if we could have featured posts from subdomains on the main site’s slider).

    The site is installed at: http://www.ksutherland.net/ausg. The slider, when broken seems to display no title, description text or “Read More” button and instead of a featured image, instead shows the header logo image.

    The relevant code from the index.php for the slider is below:

    <div id="slider_wrapper">
    
    			<?php
    				if(!empty($featured_posts_arr))
    				{
    			?>
    
    			<div id="nivo_caption_wrapper">
    			<?php
    					foreach($featured_posts_arr as $key => $featured_post)
    					{
    						$hyperlink_url = get_permalink($featured_post->ID);
    
    						if(has_post_thumbnail($featured_post->ID, 'large'))
    						{
    			?>
    
    						<div id="caption<?php echo $key; ?>" class="nivo-html-caption" <?php if($key == 0) { echo 'style="display:block"'; } ?>>
    							<h4><?php echo $featured_post->post_title; ?></h4><br/>
    							<?php echo pp_substr(strip_tags(strip_shortcodes($featured_post->post_content)), 100); ?>
    							<br/><br/>
    							<a href="<?php echo $hyperlink_url;?>" class="button"><?php echo $pp_blog_read_more_title; ?></a>
    						</div>
    
    			<?php
    						}
    					}
    			?>
    			</div>
    
    				<div id="nivo_slider" class="nivoSlider">
    
    			<?php
    					foreach($featured_posts_arr as $key => $featured_post)
    					{
    						$image_url = get_post_meta($featured_post->ID, 'blog_thumb_image_url', true);
    						$hyperlink_url = get_permalink($featured_post->ID);
    
    						if(has_post_thumbnail($featured_post->ID, 'large'))
    						{
    							$image_id = get_post_thumbnail_id($featured_post->ID);
    							$image_url = wp_get_attachment_image_src($image_id, 'large', true);
    			?>
    							<a href="<?php echo $hyperlink_url;?>">
    								<img src="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/timthumb.php?src=<?php echo $image_url[0]; ?>&h=298&w=600&zc=1" alt="#caption<?php echo $key; ?>" rel="<?php bloginfo( 'stylesheet_directory' ); ?>/timthumb.php?src=<?php echo $image_url[0]; ?>&h=60&w=60&zc=1"/>
    							</a>
    			<?php
    						}
    					}
    			?>
    
    				</div>
    			</div>

  • The topic ‘Fixing Slider for MultiSite’ is closed to new replies.