pablo631
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Problem with Getting Custom Fields in Ver 3.0???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?
Forum: Fixing WordPress
In reply to: #### Showing Up in My Posts?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 »</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: ?>
Forum: Fixing WordPress
In reply to: [How To] Show Posts Related To Category Only?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?
Forum: Themes and Templates
In reply to: Highlight Navigation depending on current category or template?Oh and I also noticed that the blog section is also highlighted when you you go to a 404 page.