在我的WordPress的网站上,当我点击我的投资组合类别,它显示标题'博客档案'这不是什么我想要。WordPress的投资组合页面使用标题'博客档案',我想它说'投资组合'
我想要一个'Portfolio'的标题。所以我找到了archive.php的模板文件,它基本上说如果变量is_Day,is_Month或is_Year已设置,那么显示相关的存档标题,否则显示'Blog Archive',看下面的代码
<h2>
<?php if (is_day()) : /* if the daily archive is loaded */ ?>
<?php printf(__('Daily Archives: <span>%s</span>'), get_the_date()); ?>
<?php elseif (is_month()) : /* if the montly archive is loaded */ ?>
<?php printf(__('Monthly Archives: <span>%s</span>'), get_the_date('F Y')); ?>
<?php elseif (is_year()) : /* if the yearly archive is loaded */ ?>
<?php printf(__('Yearly Archives: <span>%s</span>'), get_the_date('Y')); ?>
<?php else : /* if anything else is loaded, ex. if the tags or categories template is missing this page will load */ ?>
<?php _e('Blog Archive', 'theme5820'); ?>
<?php endif; ?>
</h2>
在我看来,投资组合页面正在使用档案模板来显示帖子,因为上面说'如果还有其他东西被加载,例如。如果标签或类别模板丢失,该页面将会加载'
所以我的问题是真的,只要将'Blog Archive'更改为投资组合,或者我应该为投资组合类别创建一个页面投资组合页面本身显示标题正常。
干杯,丰富:)