Changing a template on a blog page - WordPress 3.5

2019-08-31 07:09发布

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?

标签: wordpress
1条回答
Ridiculous、
2楼-- · 2019-08-31 08:02

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

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?

查看更多
登录 后发表回答