【发布时间】:2014-05-14 13:08:14
【问题描述】:
我正在为自己建立一个博客,并且我已经自定义了page-template.php。
我正在使用这样的 Wordpress query_posts 循环:
嗯,我有一个名为 page-video.php 的模板,我正在使用这个查询!
<?php query_posts("cat=65"); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="left-container-video"<?php post_class() ?> id="post-<?php the_ID(); ?>">
<header class="video-header">
<a href="<?php the_permalink() ?>"><h3> <?php the_title(); ?> </h3></a>
</header>
<div class="video-container">
<iframe src="<?php the_field("link"); ?>" frameborder="0" width="560" height="315" allowfullscreen></iframe>
</div><!-- end vid container -->
</article>
<?php endwhile; ?>
<?php else : ?>
<h2>Sidan hittades inte</h2>
<?php endif; ?>
<?php wp_reset_query(); ?>
有没有办法使用Advanced Custom Fields 将cat=65 值更改为其他值?
我想在不同的 Wordpress 页面上使用相同的模板,但我想显示不同的类别。
【问题讨论】:
-
嗨!我无法理解你的问题。你可以说得更详细点吗。你想要什么?你做了什么?
-
我正在编辑我的问题!
标签: wordpress advanced-custom-fields