Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter pablo631

    (@pablo631)

    It still came up empty, even though I tested it pulling the field using a wp_query and that worked fine. I solved it another way by getting custom post values.

    <?php
    
      $mykey_values = get_post_custom_values('image');
      foreach ( $mykey_values as $key => $value ) {
        echo "<li><img src='/10-images/product-images/$value.jpg'/></li>";
      }
    
    ?>

    The only issue is it displays an error if the custom field is not present. Which is fine for what I want. But any idea on how I would have it check first. Then if the custom field is not present display alternate content?

    Thread Starter pablo631

    (@pablo631)

    I did and I didn’t see anything. Although you are right, the two pages effected are based on single.php. I’m just using conditional statements to load in different templates.

    Here is my Loop.

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    		<div class="post" id="post-<?php the_ID(); ?>">
    								<small><?php the_time('F jS, Y') ?></small> 
    
    			<h1><?php the_title(); ?></h1>
    			<!-- by <?php the_author() ?> -->
    
    			<div class="entry">
    				<?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
    
    				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    <div class="postmetadata"><small><?php the_tags(); ?><?php edit_post_link('Edit', '', ' | '); ?> </small></div>
    
    			</div>
    		</div>
    
    	<?php comments_template(); ?>
    
    	<?php endwhile; else: ?>

    Using this method, is there a way to hide the current post from showing up in the list? So only the other related posts in the category are displayed. Not the current one?

    Thread Starter pablo631

    (@pablo631)

    Oh and I also noticed that the blog section is also highlighted when you you go to a 404 page.

Viewing 4 replies - 1 through 4 (of 4 total)