我正在开发Wordpress模板。我有一个静态索引页面。对于我的博客文章,我使用的是名为Blog
的自定义模板。但是,当我在此Blog
模板下创建一个页面并尝试查看该页面时;它不显示的博客页面,而它显示404.php
404正在工作,而不是自定义博客模板
我使用这些文件:
index.php //static index page
blog.php //blog page under Blog template
404.php
这是我的地盘http://ratcat.bugs3.com/samata/ 这是一个不工作不http://ratcat.bugs3.com/samata/blog-6
博客页面如需更多帮助,这是我blog.php的主代码段:
<div class="single_post">
<?php
// The Query
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("paged=$page");
// The Loop
if(have_posts()) :
while (have_posts()) : the_post();
?>
<table>
<tr>
<td class="left_date">
<h1><?php the_time('d') ?></h1>
<p><?php the_time('M') ?></p>
<span class="year"><p><?php the_time('Y') ?></p></span>
</td>
<td>
<a href="<?php the_permalink(); ?>" ><h2><?php the_title(); ?></h2></a>
<div class="author_tag">
<span class="author">By: <?php the_author_posts_link(); ?></span>
<span class="tag"><?php the_tags(); ?></span>
</div>
<div class="post">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('post-image', array('class' => 'post-thumb')); ?></a>
<p><?php the_excerpt(); ?></p>
<div class="read_comment">
<a href="<?php the_permalink(); ?>" title="Full post"><span class="read">Read more</span></a>
<span class="comment"><?php comments_popup_link('No Comment', '1 Comment', '% Comments'); ?></span>
</div>
</div>
</td>
</tr>
</table>
<div class="clear"></div>
<div class="gap"></div>
<?php
endwhile; ?>
<table class="nav_post">
<tr>
<td><div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Previous posts')); ?></div></td>
<td><div class="nav-next"><?php previous_posts_link(__('Next posts <span class="meta-nav">»</span>')); ?></div></td>
</tr>
</table>
<?php
endif;
// Reset Query
wp_reset_query();
?>
</div>
确定首先检查是否导致我的永久链接结构更改您的永久链接默认并查看是否发生任何事 – anstrangel0ver 2013-04-05 10:03:53
您可以粘贴您的永久链接设置并检查重写模块是否启用。 – 2013-04-05 11:04:25
什么都没有发生。同样的404问题。有一件事,当我在它下面创建一个页面时,我也有一个名为Personal Journey的自定义模板。该页面正常工作。 @ anstrangel0ver – 2013-04-05 11:20:44