wordpress赢得';t显示柱

wordpress赢得';t显示柱,wordpress,Wordpress,我的问题是我无法让Wordpress显示我需要的帖子 我已经尝试过使用两种方法,第一种是在阅读设置中选择一个页面来显示不起作用的帖子。第二个是getpost插件,它使用短代码[get_posts]显示帖子。它没有显示任何帖子,只是显示短代码,插件处于活动状态 我希望它看起来像这样,但在这一页上 我一直在寻找这个有一段时间,任何帮助将不胜感激 多谢各位 编辑:代码 <?php if (is_page() ) { $category = get_post_meta($posts[0]->

我的问题是我无法让Wordpress显示我需要的帖子

我已经尝试过使用两种方法,第一种是在阅读设置中选择一个页面来显示不起作用的帖子。第二个是getpost插件,它使用短代码[get_posts]显示帖子。它没有显示任何帖子,只是显示短代码,插件处于活动状态

我希望它看起来像这样,但在这一页上

我一直在寻找这个有一段时间,任何帮助将不胜感激

多谢各位

编辑:代码

<?php
if (is_page() ) {
$category = get_post_meta($posts[0]->ID, 'category', true);
}
if ($category) {
$cat = get_cat_ID($category);
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$post_per_page = -1; // -1 shows all posts
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
'category__in' => array($cat),
'orderby' => 'date',
'order' => 'DESC',
'paged' => $paged,
'posts_per_page' => $post_per_page,
'caller_get_posts' => $do_not_show_stickies
);
$temp = $wp_query;  // assign orginal query to temp variable for later use   
$wp_query = null;
$wp_query = new WP_Query($args); 
if( have_posts() ) : 
    while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?     php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    <div class="entry">
      <?php the_excerpt('Read the rest of this entry »'); ?>
     <a href="<?php the_permalink() ?>">Read More..</a>
     <BR><BR>
    </div>

  </div>
<?php endwhile; ?>
<div class="navigation">
  <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
  <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
 <?php else : ?>
    <h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php get_search_form(); ?>
<?php endif; 
$wp_query = $temp;  //reset back to original query
  }  // if ($category)
 ?>



找不到

抱歉,您正在寻找不在这里的东西


市场上的每一个Wordpress主题都会以非常不同的方式处理帖子的显示。它可以根据页面、短代码、模板、设置等进行设置


我们需要知道你在使用什么主题来帮助你。为了帮助您自己,请通过检查主题文档文件、主题开发者或任何主题帮助论坛来研究如何激活博客。

我个人会为该页面编写一个页面模板,然后创建一个新页面并使用该模板。开始阅读并从那里开始。

发布一个代表性的(又名小)代码示例。否则这个问题基本上是无法解决的。你想看哪一部分?马克是对的-我们需要更多的信息。我会首先在你的设置>阅读下检查,并验证这些是否适合你的主题。如果您正在滚动自己的主题,请确保您正在调用“循环”,而不是显示静态内容。帮助我们:你用的是什么主题。如果你自己的-在循环区域/主页中显示一些调用循环的代码。我相信这就是你所要求的。请编辑你的文章,并把代码放在正文中,这样我们就可以很容易地阅读它。我正在使用一个已经应用的自定义主题。这对我来说现在变得非常沮丧。我有权访问该网站,我希望它看起来像,但在其中找不到任何东西来帮助我做我需要的那么你是在告诉我你创建了你自己的wordpress主题吗?是你自己动手建造的?如果是这样的话,这会对你有帮助吗?我希望我不会有这个问题,我是在其他人建立了这个网站但没有完成工作之后进来的。我有使用WordPress作为CMS的经验,但与PasSh OH斗争,你可能想考虑使用一个专业的主题,如创世记,论文或主题。安装并试用一个新主题的网站不会带来任何伤害,可能会立即解决您的问题!如果你想看一看,我已经在原始帖子中发布了代码。我假设你点击了管理面板中的“新建页面”选项。这是我建议的第二步。