所以我的问题是:我创建了一个名为“项目”的自定义帖子类型。我已经通过WPAlchemy成功添加了几个代谢组。这些很好用。我遇到的问题是,当我为相关项目创建带有复选框的元框时,我可以使用复选框列出所有项目标题,但当我至少选择一个并保存自定义帖子时,它会重写Slug。我想是因为我打电话<?php the_title(); ?>
. 下面是我的meta PHP文件代码:
<div class="my_meta_control">
<p>Add or subtract Athena projects related to this project.</p>
<label>Available Projects</label><br/>
<?php
$items = new WP_Query(array(
\'post_type\' => \'athena_project\',
\'posts_per_page\' => 1000
));
while ( $items->have_posts() ) : $items->the_post();
?>
<input type="checkbox" name="<?php $mb->the_name(); ?>" value="<?php echo the_title(); ?>"/><?php the_title(); ?><br />
<?php endwhile; wp_reset_query(); ?>
<br />
<input type="submit" class="button-primary" name="save" value="Save" />
</div>
有没有人有好的建议来回避这个问题?