简体   繁体   English

Wordpress中页面的不同设计

[英]Different design for pages in wordpress

I am working over word press after a long long time. 很长一段时间后,我正在研究文字印刷。 In my website , I have a number of pages and most of them are of different designs. 在我的网站上,我有很多页面,其中大多数页面设计不同。 They all are added under pages but designs will be different for them. 它们都添加在页面下,但设计会有所不同。

I just want to know the standard way to handle them. 我只想知道处理它们的标准方法。 Is there any different template scheme to handle different designs of pages ?? 是否有任何不同的模板方案来处理不同的页面设计?

Thanks 谢谢

You can simply place a tag at the top of your pages, say you create a file my-templated-page.php , you would tag at the top of that file like so: 您可以简单地在页面顶部放置一个标签,比如说您创建了一个文件my-templated-page.php ,您可以在该文件的顶部进行标签,如下所示:

<?php
/*
*
* Template Name: My Template 1.0
*
*/
?>

That will allow you to go into Pages and select dropdown box ' Template ' and select your template name My Template 1.0 . 这样,您就可以进入Pages并选择下拉框“ Template ”,然后选择模板名称My Template 1.0 Simple style your my-templated-page.php as desired. 根据需要对my-templated-page.php简单样式设置。

No, you simply create headers and footers for every design. 不,您只需为每个设计创建页眉和页脚。 If that's what you want. 如果那是你想要的。

Every page templates 每页模板

<?php get_header('header_page1'); ?> // it points to header-header_page1.php
    //custom html for Page 1
<?php get_footer('footer_page1'); ?> // it points to header-footer_page1.php

Reference here 这里参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM