admin管理员组文章数量:1332889
I created a generic taxonomy.php file to list posts with certain terms.
<?php get_header(); ?>
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post(); ?>
<a href="<?php echo get_permalink(); ?>"><h1><?php echo get_the_title(); ?></h1></a>
<?php endwhile;
endif;
?>
<?php get_footer(); ?>
The page works fine but it looks like it's inheriting terms and other things from the first post of the list in the loop... it even has the post ID of that said post.
How do I prevent this from happening? I have conditions within my enqueue.php that loads different styles for this particular post which I don't want.
本文标签: termsTaxonomyphp inheriting first post
版权声明:本文标题:terms - Taxonomy.php inheriting first post 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742315472a2451729.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论