Forums

[Plugin: Thumbnail For Excerpts] Place IMG after Meta, Not Excerpt? (2 posts)

  1. nekobaby
    Member
    Posted 1 year ago #

    Is there anyway to alter the coding so that the image will show up after the_meta? My excerpts spit out information in the following coding

    <?php the_meta(); ?>
    
    <?php if($post->post_excerpt) :
     the_excerpt(); ?>
    <center>
    <h4><a href="<?php the_permalink() ?>" rel="bookmark"
    title="Read <?php the_title(); ?>">
    Read <?php the_title(); ?>
    </h4></a> </center>»
    <?php else:
     the_content();
     endif;
     ?>

    So essentially, I'm popping meta info before my excerpt and I want to pull a thumbnail next to that meta info. This is what I'm going for...
    ----------------------------------------------------------
    DATE TITLE CATEGORY, ETC

    Status: here
    Genre: info here -------------------------> | image |
    Rating: info here

    EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT EXCERPT
    -----------------------------------------------------------
    Any ideas?

  2. nekobaby
    Member
    Posted 1 year ago #

    Okay, I'm using the following coding, the original was found here, and I don't need to use the thumbnail-for-excerpts plugin!

    One problem, though. I can pull the image into my meta section, but the Key title and the link in the Value show as text as well. My coding is as follows....

    <?php get_header(); ?>
     <?php get_sidebar(); ?>
     <!-- Content -->
         <div id="content">
    	<?php if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
    	<?php $Thumbnail = get_post_meta($post->ID,'Thumbnail',true);?>
     <!-- Post -->
    	<div class="post" id="post-<?php the_ID(); ?>">
    	    <div class="post-title">
    	      <div class="post-date"><span><?php the_time('d')?>
                           </span><?php the_time('M') ?></div>
    		<h2>
                    <a href="<?php the_permalink() ?>" rel="bookmark"
                    title="Permanent Link to <?php the_title_attribute();
                    ?>">
                    <?php the_title(); ?></a>
                    </h2>Author: <?php the_author() ?>
                    &nbsp;//&nbsp;Category: <?php the_category(', ') ?>
    	       </div>
    	       <div class="post-entry">
    
                    <?php if($Thumbnail !== '') { ?><a href="<?php
                      the_permalink(); ?>"><img src="<?php echo
                      get_post_meta($post->ID, "Thumbnail", true); ?>"
                      style="width:125px; margin:15px auto 0 auto;"
                      alt="<?php the_title(); ?> <?php _e('thumbnail');
                      ?>" class="alignleft" />
                      <?php } ?></a>
    
                      <?php the_meta(); ?>
    
                      <?php if($post->post_excerpt) :the_excerpt();?>
                      <center><h4><a href="<?php the_permalink() ?>"
                     rel="bookmark" title="Read <?php the_title();?>">Read
                      <?php the_title(); ?></h4></a> </center>»
    
                      <?php else:the_content();endif;?>
    
                      <center><h3><?php link_pages(''); ?></h3></center>
    
    		 </div>
    
    		 <div class="post-info">
    		   <?php comments_popup_link('Comments (0)', 'Comment
                        (1)', 'Comments (%)'); ?> &nbsp;// &nbsp;<a
                        href="<?php the_permalink() ?>#respond">Add
                        Comment</a>
    		 </div>
    		</div>
    		<!-- /Post -->
    		<?php endwhile; ?>
    		<!-- Navigation -->
    	     <div class="navigation">
    	     <div class="navigation-previous"><?php
                 next_posts_link('&laquo; Previous Entries') ?></div>
                 <div class="navigation-next"><?php
                  previous_posts_link('Next Entries &raquo;') ?></div>
    			</div>
    			<!-- /Navigation -->
    			<?php else : ?>
    			<!-- Post -->
    			<div class="post">
    				<div class="post-title">
    					<h2>Not Found</h2>
    				</div>
    				<div class="post-entry">
    					Sorry, but you are looking for
                                     something that isn't here.
    
    				</div>
    			</div>
    			<!-- /Post -->
    			<?php endif; ?>
    
    			<div class="clear"></div>
    
    		</div>
    		<!-- /Content -->
    
    <?php get_footer(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic