• Resolved codysweet02

    (@codysweet02)


    Here is my site: https://fighttrends.com/2009/07/favorite-62-gear-t-shirt/

    I moved the 4 lines below from below the picture to above it and now my tags do not apear on teh “Posted In:” line.

    Favorite 62 Gear T-Shirt
    Posted On: July 2, 2009
    Posted In:
    Comments: One Response

    I changed the code from:

    <?php get_header(); ?>
    
    <div id="contentwrap">
    
        <div id="maincontent">
    
            <?php if (have_posts()) : ?>
            <?php while (have_posts()) : the_post(); ?>
    
            <?php if ( get_post_meta($post->ID, "_p75_thumbnail", true) ): ?>
            <div class="post_image">
                <a class="original" href="<?php echo p75GetOriginalImage($post->ID); ?>" title="Instant View"><img src="<?php echo p75GetThumbnail($post->ID, 620, 400); ?>" alt="<?php the_title(); ?>" /></a>
            </div>
            <?php endif; ?> 
    
            <div class="postcontent">
                <h2><?php the_title(); ?></h2>
    
                <div class="postdets">
                    Posted On: <?php the_time('F j, Y'); ?><br />
                    Posted In: <?php the_tags(' '); ?><br />
                    Comments: <a href="<?php the_permalink() ?>#comments"><?php comments_number('No Responses','One Response','% Responses'); ?></a>
                </div>                   
    
                <?php the_content(''); ?>
            </div>
    
            <div id="comments">
                <?php comments_template(); ?>
            </div>
    
            <?php endwhile; ?>
            <?php else : ?>
    
            <h2 class='center'>No posts found</h2>
    
            <?php endif; ?>           
    
        </div> <!-- maincontent -->
    
        <?php get_sidebar(); ?>
    
    </div> <!-- contentwrap -->
    
    <?php get_footer(); ?>

    To

    <?php get_header(); ?>
    
    <div id="contentwrap">
    
        <div id="maincontent">
    
            <div class="postcontent">
    
                <h2><?php the_title(); ?></h2>
    
                <div class="postdets">
    
                    Posted On: <?php the_time('F j, Y'); ?><br />
    
                    Posted In: <?php the_tags(' '); ?><br />
    
                    Comments: <a href="<?php the_permalink() ?>#comments"><?php comments_number('No Responses','One Response','% Responses'); ?></a>  
    
                </div>   
    
            <?php if (have_posts()) : ?>
    
            <?php while (have_posts()) : the_post(); ?>
    
            <?php if ( get_post_meta($post->ID, "_p75_thumbnail", true) ): ?>
    
            <div class="post_image">
    
                <a class="original" href="<?php echo p75GetOriginalImage($post->ID); ?>" title="Instant View"><img src="<?php echo p75GetThumbnail($post->ID, 620, 400); ?>" alt="<?php the_title(); ?>" /></a>
    
            </div>
    
            <?php endif; ?> 
    
                <?php the_content(''); ?>
    
            </div>
    
            <div id="comments">
    
                <?php comments_template(); ?>
    
            </div>
    
            <?php endwhile; ?>
    
            <?php else : ?>
    
            <h2 class='center'>No posts found</h2>
    
            <?php endif; ?>           
    
        </div> <!-- maincontent -->
    
        <?php get_sidebar(); ?>
    
    </div> <!-- contentwrap -->
    
    <?php get_footer(); ?>

    I am very new to this so any help is REALLY appreciated!

    Thanks all!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Switch the code back to what it was originally and then explain exactly what it was that you wanted to do.

    And please don’t post huge chunks of code here. For larger blocks of code, use the WordPress pastebin. It makes life easier for everyone. ??

    Thread Starter codysweet02

    (@codysweet02)

    Thanks esmi. I will use the pastebin from now on.

    I changed the code back to normal.

    I am trying to move all of this above the picture. However, when I do this the tags after “Posted In:” dissapear.

    Favorite 62 Gear T-Shirt
    Posted On: July 2, 2009
    Posted In: 62 gear, Six Deuce Gear, T-Shirt
    Comments: One Response

    Try:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="postdets">
    Posted On: <?php the_time('F j, Y'); ?><br />
    Posted In: <?php the_tags(' '); ?><br />
    Comments: <a href="<?php the_permalink() ?>#comments"><?php comments_number('No Responses','One Response','% Responses'); ?></a>
    </div> 
    
    <?php if ( get_post_meta($post->ID, "_p75_thumbnail", true) ): ?>
    <div class="post_image">
    <a class="original" href="<?php echo p75GetOriginalImage($post->ID); ?>" title="Instant View"><img src="<?php echo p75GetThumbnail($post->ID, 620, 400); ?>" alt="<?php the_title(); ?>" /></a>
    </div>
    <?php endif; ?> 
    
    <div class="postcontent">
    <h2><?php the_title(); ?></h2>

    Thread Starter codysweet02

    (@codysweet02)

    Works great!

    Thanks esmi!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘My tags keep disappearing.’ is closed to new replies.