我正在(本地)构建一个自定义主题。
到目前为止,我已经:
索引。php单键。php第页。php称为about page的自定义页面模板。php有两个不同的标题:一个用于默认用途,另一个用于单个。php无函数。php;没有自定义分类法;永久链接设置>常用设置:默认值
我的索引。php有一个帖子列表(所有属于指定类别的帖子),当我点击其中一篇帖子时,我就结束了索引。php,但具有正确的自定义标题(我为帖子创建的标题,称为header single.php)。
So, I\'m getting the index.php istead of the single.php
我读到周围的人对“年”这个词或其他一些保留条款也有同样的问题。我不认为这是我的情况。在我的主页中,我有:
<?php
/**
* Template Name: Front Page Template
*/
get_header(); ?>
<nav id="menu">
<ul class="postlist">
<?php
$lastposts = get_posts(\'numberposts=20&orderby=date&cat=9\');
foreach($lastposts as $post) :
setup_postdata($post);
?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a</li>
<?php endforeach; ?>
</ul>
</nav>
<?php get_footer(); ?>
编辑这是我单曲的结构。php
<?php
/*
Template Name: Single project
*/
get_header(); ?>
<div id="flex-container">
//something
</div>
<div id="read">
<a>READ</a>
</div>
<div id="read_slider">
<div id="read_close">
<a>CLOSE</a>
</div>
<div id="read_text">
<?php the_content(); ?>
</div>
</div>
</div>
<?php get_footer(); ?>