• Hi! I’m using a template to build a new blog site that already has a featured post area built in. However, I’m trying to replace that featured post area with the Featured Content gallery plug-in. Every time I tinker with the code, something goes horribly wrong. This is what the code for the featured.php looks like now:

    <!-- begin featured -->
    <div class="fwrapper">
    <div class="featured-img">
    	<div id="featured">
    	<div class="featured">
    		<?php
    		$tmp_query = $wp_query;
    		query_posts('cat=' . get_cat_ID(dp_settings('featured')));
    		if (have_posts()) :
    		$first = true;
    		while (have_posts()) : the_post();
    		ob_start();
    		?>
    		<li<?php if ($first) echo ' class="first"'; ?>><a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'full', 'alt="' . $post->post_title . '"'); ?></a></li>
    		<?php
    		$photos .= ob_get_clean();
    		ob_start();
    		?>
    		<li<?php if ($first) echo ' class="first"'; ?>>
    			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    			<p><?php echo dp_clean($post->post_content, 300); ?></p>
    			<a href="<?php the_permalink(); ?>" class="next">Read Full Story</a>
    		</li>
    		<?php
    		$text .= ob_get_clean();
    		$first = false;
    		endwhile;
    		endif;
    		?>
    		<ul class="photo">
    		<?php echo $photos; ?>
    		</ul>
    		<ul class="text">
    		<?php echo $text; ?>
    		</ul>
    	</div>
    	</div>
    </div>
    </div>
    <?php $wp_query = $tmp_query; ?>
    <!-- end featured -->

    and the plug-in I want to install instead is here. Can anyone help me out?

Viewing 1 replies (of 1 total)
  • Are you using Render Magazine? Did you find an answer because I have the same question with this template.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Replacing template featured area with plugin?’ is closed to new replies.