【发布时间】:2015-07-02 18:10:06
【问题描述】:
我需要在 wordpress 中显示帖子的内容。基本上我需要在点击时显示一个 div,但只显示当前帖子。我在页面上循环显示所有帖子的标题和摘录。我只想显示点击的当前标题帖子的内容。下面的示例是我目前拥有的。
$(document).on('click', '.post-id', function() {
$(myClass, ".post-content").show();
});
<div class="post-full">
<h2 class="post-id<?php //echo get_the_ID(); ?>"><?php the_title(); ?><div class="close">Close</div></h2>
<div class="post-excerpt"><h3><?php the_excerpt(); ?></h3></div>
<div class="post-content"><?php the_content(); ?></div>
</div>
【问题讨论】:
标签: php jquery html wordpress click