我已经在我的wordpress本地工作了,并且会在我的一个页面下放置网站应该在这个图像中显示。但我不是吗?
我试图一遍又一遍地覆盖文件,但我不会帮忙 页面具有正确的自定义字段..
http://i58.tinypic.com/14u9sg5.png
<div class="main">
<?php
$categoriesCF = get_post_meta($post->ID, "categories", true);
// example value = "PREVIOUS|35, SCHEDULE|37"
$allCategories = explode(",", $categoriesCF);
// $allCategories[0] = "PREVIOUS|35"
// $allCategories[1] = "SCHEDULE|37"
foreach ($allCategories as $category) {
$pieces = explode("|", $category);
// $pieces[0] = "SCHEDULE"
// $pieces[1] = 37
$link = get_permalink($pieces[1]);
echo "<div class='mission-post'>";
echo "<h3><a href='$link'>" . $pieces[0] . "</a></h3>";
query_posts("posts_per_page=-1&post_type=page&post_parent=$pieces[1]");
while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" class="product-jump" title="<?php echo "$" . get_post_meta($post->ID, "title", true); ?>" data-large="<?php get_post_meta($post->ID, "mission_lille", true); ?>">
<?php echo "<img src='" . get_post_meta($post->ID, "mission_lille", true) . "'/>"; ?>
<span class="product-title"><?php the_title(); ?></span>
<span class="product-code">Location:<?php echo get_post_meta($post->ID, "location", true); ?></span>
<span class="product-code">Type:<?php echo get_post_meta($post->ID, "type", true); ?></span>
<span class="product-code">Date:<?php echo get_post_meta($post- >ID, "date", true); ?></span>
<p><b>Read More</b></p>
</a>
<?php endwhile; wp_reset_query();
echo "</div>";
};
?>