索引文件中的Wordpress动态内容

时间:2014-01-22 17:50:58

标签: wordpress

我是wordpress的新手。

我在wordpress的最新版本中使用customizr主题。

I just put my html in theme index file.
Now i am not getting the posts dynamic content,when click on posts link.

I know i am missing some syntax that makes the content area dynamic

How would i make my home page content area dynamic.

Please help ..

Thanks

1 个答案:

答案 0 :(得分:0)

试试这个

      

  <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
  <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>

  <li><?php echo substr(strip_tags($post->post_content), 0, 250);?></li>
  <?php endwhile;?>
</ul>