更改博客页面上的模板 - WordPress 3.5.1 [英] Changing a template on a blog page - WordPress 3.5.1

查看:36
本文介绍了更改博客页面上的模板 - WordPress 3.5.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是旧版 WordPress 3.5.1.我知道如何在不同的页面上使用不同的模板,但问题是我不知道如何为我的博客页面设置不同的模板.当我在编辑模式下打开博客页面时,我看到一个空白页面,与显示其内容的其他页面相反.此页面是否可能是从其他地方重定向的,我该如何解决?此外,当我从页面属性更改模板时,它不会生效.在任何其他页面上它都有效,但这个页面.我如何知道如何更改页面模板?

I am using an older version of WordPress 3.5.1. I know how to use different templates on different pages but the problem is I cant figure out how to set a different template for my blog page. When I open the page Blog in the Edit Mode I see a blank page, contrary to my other pages which display their content. Is it possible that this page is a redirected from somewhere else and how can I figure it out? Also when I change the template from Page Attribute it does not take effect. On any other page it works but this one. How can I figure out how to change the page template?

推荐答案

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

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?

这篇关于更改博客页面上的模板 - WordPress 3.5.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆