我把这个放在头上了。php输入<head>
第节:
$page_color = get_post_meta($post->ID, \'page_color\', true);
它工作得很好,因为它是正确的page_color
对于帖子和页面,但当我执行一些搜索和搜索时。php运行时,偶尔会page_color
它找到的第一个帖子。这是搜索的内容。php:<?php
if( have_posts() ) :
while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
<?php endwhile; ?>
<?php else : ?>
Nothing found.
<?php endif; ?>
你知道为什么吗?