admin管理员组文章数量:1130349
Is it possible (and good practice) to set the index.php file as my static home page, without any posts? In Settings > Reading Settings > Front Page Displays I don't see the option to select index.php as a front page option.
Is index.php not meant to be a static front page? Must I create a new page, such as home.php or splash.php, for my static front page?
Is it possible (and good practice) to set the index.php file as my static home page, without any posts? In Settings > Reading Settings > Front Page Displays I don't see the option to select index.php as a front page option.
Is index.php not meant to be a static front page? Must I create a new page, such as home.php or splash.php, for my static front page?
Share Improve this question edited Jan 26, 2017 at 17:27 lurning too koad asked Jan 26, 2017 at 17:17 lurning too koadlurning too koad 6292 gold badges7 silver badges13 bronze badges2 Answers
Reset to default 1I think you are confuse with templates from pages and posts. Please take a look at Template Hierarchy first. Both home.php and index.php in WordPress are templates. If you need a static page, create a Page instead a Post, and you can name it anything you want, the name is simply a slug, so you can call it Index or Home. Pages can be added into the Menu, and you can specify which one will be your Home (or what you means as the index.php) that will be shown up when you pointing your url to www.your-domain.
You should make a template file See here how to do this and then Select your custom template in WordPress page
then set this page as your Static Front Page.
Is it possible (and good practice) to set the index.php file as my static home page, without any posts? In Settings > Reading Settings > Front Page Displays I don't see the option to select index.php as a front page option.
Is index.php not meant to be a static front page? Must I create a new page, such as home.php or splash.php, for my static front page?
Is it possible (and good practice) to set the index.php file as my static home page, without any posts? In Settings > Reading Settings > Front Page Displays I don't see the option to select index.php as a front page option.
Is index.php not meant to be a static front page? Must I create a new page, such as home.php or splash.php, for my static front page?
Share Improve this question edited Jan 26, 2017 at 17:27 lurning too koad asked Jan 26, 2017 at 17:17 lurning too koadlurning too koad 6292 gold badges7 silver badges13 bronze badges2 Answers
Reset to default 1I think you are confuse with templates from pages and posts. Please take a look at Template Hierarchy first. Both home.php and index.php in WordPress are templates. If you need a static page, create a Page instead a Post, and you can name it anything you want, the name is simply a slug, so you can call it Index or Home. Pages can be added into the Menu, and you can specify which one will be your Home (or what you means as the index.php) that will be shown up when you pointing your url to www.your-domain.
You should make a template file See here how to do this and then Select your custom template in WordPress page
then set this page as your Static Front Page.
本文标签: frontpageSetting indexphp as a static home page without posts
版权声明:本文标题:frontpage - Setting index.php as a static home page without posts? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749257140a2340670.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论