且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更改博客页面上的模板 - WordPress 3.5.1

更新时间:2023-12-01 23:20:34

没有内置的可供博客文章选择的模板系统.它基于实际的模板文件及其层次结构.

There's no built in selectable templating system for blog posts. Its based on the actual template files and their hierarchical structure.

http://codex.wordpress.org/Template_Hierarchy

可能是您的 index.php 或 single.php 引发了错误.我会进入 wp-config.php 并找到显示 define('WP_DEBUG', false); 的行并将其更改为 true.然后重新加载页面,看看它是否会吐出错误.一个基本的循环只有几行 php,所以我猜页面上的某个地方有错误.

Its probably your index.php or single.php that is throwing an error. I would go into the wp-config.php and find the line that says define('WP_DEBUG', false); and change that to true. Then reload the page and see if it spits out an error. A basic loop is only a few lines of php, so I would guess there's an error somewhere on the page.

至于更改模板时页面没有变化,可能是模板本身存在条件代码或其他内容.您是说它只会改变某些页面上的页面外观,而不会改变其他页面的外观?

As for the pages not changing when you change the template, its possible there is conditional code or something in the template itself. Are you saying it only changes the look of the page on some pages but not others?