954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

NewB. Working on a WordPress System.

Hi all! I'm putting together a WordPress blog, and I'm trying to make it work with a standard template called "Tribune." It uses custom tags on posts to apply thumbnails and featured images. I can't quite figure out where to place the code in the index file to get it working. The website is www.prezblog.com .

Here's the code they want me to embed, with a few parameters.

<?php if(function_exists('wp_smart_image')) wp_smart_image($size='mini', $type = 'single') ?>


My index file is as follows, and is also attached:

<?php get_header(); ?>

	<div id="content" class="narrowcolumn">

	<?php if (have_posts()) : ?>
    <?php if(function_exists('wp_smart_image')) wp_smart_image($size='mini', $type = 'single') ?>


		<?php while (have_posts()) : the_post(); ?>

			<div class="post" id="post-<?php the_ID(); ?>">
			
								<div class="PostHead">

	<div class="PostTime"><?php the_time('<b>j</b> <a>M Y</a>') ?> </div>
	<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
	<small class="PostDet"><?php edit_post_link('Edit', '', ' | '); ?> Author: <?php the_author() ?> | Filed under: <?php the_category(', ') ?>
	</small>

	</div>

			<div class="entry">
<!-- Ads -->
					<?php the_content('Read the rest of this entry &raquo;'); ?>
			</div>
			</div>	
			
			<p class="postmetadata">
			<span class="tags"><?php the_tags('Tags: ', ', '); ?> </span>
			</p>
			
			<div class="comments"><?php comments_popup_link('NO COMMENTS', '<span> 1 </span> COMMENTS', '<span> % </span> COMMENTS'); ?></div>


		<?php endwhile; ?>

	

	<?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
		<?php include (TEMPLATEPATH . "/searchform.php"); ?>

	<?php endif; ?>
    
    

	</div>

<?php get_sidebar(); ?>
<div class="sidebar-right"> 
<div class="twitter">
<div class="twitter-content">
        <ul id="twitter_update_list"><li></li></ul></div>
		<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
        <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/gopalraju.json?callback=twitterCallback2&amp;count=1"></script>
<a class="followme" href="http://twitter.com/gopalraju">Follow us on twitter</a>
</div>

<img src="<?php bloginfo('template_url'); ?>/images/pdlogo.gif" alt="productivedreams" class="pdlogo"/>

</div>



<div class="google-ads">

</div>


</div>

<?php get_footer(); ?>


Thanks to anyone and everyone!

Attachments index.php (2.02KB)
prezblog
Newbie Poster
3 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

Is this not just a plugin you need to install?

Kraai
Senior Poster
3,981 posts since Feb 2008
Reputation Points: 76
Solved Threads: 87
 

I have installed the plugin, called "WP Smart Image II", and it requires a bit of PHP coding in the segment of the index code that is apparently called "The Loop".

http://www.darioferrer.com/wp-smart-image/english http://www.darioferrer.com/wp-smart-image/english

http://wordpress.org/extend/plugins/wp-smart-image-ii/ http://wordpress.org/extend/plugins/wp-smart-image-ii/

prezblog
Newbie Poster
3 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

OK, according to the first link you gave, in the comment section, it seems that the code must be inserted inside the so try this and see if it works.



<?php get_header(); ?>

<div id="content" class="narrowcolumn">

<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<div class="post" id="post-<?php the_ID(); ?>">

<div class="PostHead">

<div class="PostTime"><?php the_time('<b>j</b> <a>M Y</a>') ?> </div>
<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<small class="PostDet"><?php edit_post_link('Edit', '', ' | '); ?> Author: <?php the_author() ?> | Filed under: <?php the_category(', ') ?>
</small>

</div>

<div class="entry">
<!-- Ads -->

<?php if(function_exists('wp_smart_image')) wp_smart_image($size='mini', $type = 'single') ?>

<?php the_content('Read the rest of this entry &raquo;'); ?>
</div>
</div>

<p class="postmetadata">
<span class="tags"><?php the_tags('Tags: ', ', '); ?> </span>
</p>

<div class="comments"><?php comments_popup_link('NO COMMENTS', '<span> 1 </span> COMMENTS', '<span> % </span> COMMENTS'); ?></div>


<?php endwhile; ?>



<?php else : ?>

<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>

<?php endif; ?>



</div>

<?php get_sidebar(); ?>
<div class="sidebar-right">
<div class="twitter">
<div class="twitter-content">
<ul id="twitter_update_list"><li></li></ul></div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/gopalraju.json?callback=twitterCallback2&amp;count=1"></script>
<a class="followme" href="http://twitter.com/gopalraju">Follow us on twitter</a>
</div>

<img src="<?php bloginfo('template_url'); ?>/images/pdlogo.gif" alt="productivedreams" class="pdlogo"/>

</div>



<div class="google-ads">

</div>


</div>

<?php get_footer(); ?>



Let us know

Kraai
Senior Poster
3,981 posts since Feb 2008
Reputation Points: 76
Solved Threads: 87
 

That looks like it's it- thanks! So, a simple copy and paste was all it took?

prezblog
Newbie Poster
3 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

Hi

Glad you got it working

Good luck

Kraai
Senior Poster
3,981 posts since Feb 2008
Reputation Points: 76
Solved Threads: 87
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: