站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Upgrade 1.2 to 1.5
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
===升级旧的模板 – 高级的=== Depending upon how customized your old WordPress site was, the process of modifying your old WordPress layout and design may be simple or complex. There are basically three methods: Working from your old site files, designing from scratch or redesigning an existing WordPress Theme. 根据你的旧的WordPress站点的自定义程度的差别,更改旧的WordPress的布局和设计可能很简单,也可能很复杂。基本上有三种更改的方法:从处理旧的站点文件开始或者从零开始,重新设计当前的WordPress主题。 We recommend the latter if you are not very experienced with CSS and HTML/XHTML. To design your Theme from scratch, you will find more indepth information on how to modify the layout elements in Themes and customize your Theme at [[WordPress:Theme Development]]. If you are determined to use your old site files, here are the instructions. 如果你不很熟悉CSS和HTML/XHTML,我们建议你从使用后一种方法。从零开始,设计主题,你会发现许多关于怎样更改主题布局元素和在[[WordPress:Theme Development|主题发展]]中自定义主题的深入信息。如果你决定使用旧的站点的文件,下面有一些指示说明: To modify an existing Theme, follow these step-by-step instructions. 要更改当前的主题,请遵循一步步的指导。 <ol> <li>Copy the following files from the Classic or Default WordPress Theme into a new folder: <ol> <li>从经典的或者默认的WordPress主题中,将下面的文件复制到一个新的文件夹: :# <tt>index.php</tt> :# <tt>wp-comments.php</tt> :# <tt>wp-comments-popup.php</tt> :# <tt>wp-layout.css</tt> :# <tt>searchform.php</tt></li> :# <tt>index.php</tt> :# <tt>wp-comments.php</tt> :# <tt>wp-comments-popup.php</tt> :# <tt>wp-layout.css</tt> :# <tt>searchform.php</tt></li> <li>Open your <tt>index.php</tt> in your [[WordPress:Glossary#Text_editor|text editor]].</li> <li>在你的<tt>index.php</tt> [[WordPress:Glossary#Text_editor|文本编辑器]]中打开<tt>index.php</tt>。</li> <li>Comment out the wp-blog-header require line at the top of <tt>index.php</tt>. Do this by putting // at the start of each line.<br /> <li>在<tt>index.php</tt>的顶上方comment out wp-blog-header需要的行。在每行的开始加上//。<br /> <pre><?php //* Don't remove this line. */ //require('./wp-blog-header.php'); ?> </pre></li> <li>Update the stylesheet import line in index.php. Replace this:<br /> <pre>@import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );</pre> with this:<br /> <pre>@import url( <?php bloginfo('stylesheet_url'); ?> ); </pre></li> <li><strong>If you use the Default Theme</strong>, you will have a line like this:<br /> <pre><nowiki><link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-layout.css" type="text/css" media="screen" /></nowiki></pre> You must change that to this:<br /> <pre> <nowiki><link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /></nowiki></pre></li> <li>Update the wp-comments include line in index.php. Replace this:<br /> <pre><?php include(ABSPATH . 'wp-comments.php'); ?> </pre> with this:<br /> <pre> <?php comments_template(); ?> </pre></li> <li>Now save <tt>index.php</tt></li> <li>Rename <tt>wp-comments.php</tt> to <strong><tt>comments.php</tt></strong></li> <li>Open <tt>wp-comments-popup.php</tt>. Find this line at the top :<br /> <pre>require ('wp-blog-header.php');</pre><br />You must comment out that line like this:<br /> <pre> // require ('wp-blog-header.php');</pre> The top of your <tt>wp-comments-popup.php</tt> must look like this:<br /> <pre> <?php /* Don't remove these lines. */ $blog = 1; //require ('wp-blog-header.php'); add_filter('comment_text', 'popuplinks');</pre></li> <li>Save the file.</li> <li>Rename <tt>wp-comments-popup.php</tt> as '''<tt>comments-popup.php</tt>'''.</li> <li>Add a theme header to <tt>wp-layout.css</tt> that looks something like this (you can just copy and paste this for now):<br /> <pre> /* Theme Name: My Original Layout Theme URI: http://myblog.com/ Description: Your theme Version: 1 Author: You Author URI: http://myblog.com/ */</pre></li> <li>Now rename <tt>wp-layout.css</tt> to '''<tt>style.css</tt>'''.</li> <li>You should now have 4 or 5 files: :# <tt>index.php</tt> :# <tt>comments.php</tt> :# <tt>comments-popup.php</tt> :# <tt>style.css</tt> :# IF you use the Default Theme, you will have 5 files - <tt>searchform.php</tt></li> <li>Now create a folder with the name of the theme (for example, <tt>carrots</tt>) and put the first four files there into that folder (and <tt>searchform.php</tt> if you use the Default Theme).</li> <li>FTP this <tt>carrots</tt> folder into the <tt>wp-content/themes/</tt> folder. You should already have a <tt>classic</tt> folder and a <tt>default</tt> folder inside there.</li> <li>Set the active theme to this theme you have created by selecting it in the Presentation Panel.</li> </ol> <pre><?php //*不要移除这一行。 */ //需要('./wp-blog-header.php'); ?> </pre></li> <li>更新样式表index.php中的导入行。将这个:<br /> <pre>@import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );</pre> 替换为:<br /> <pre>@import url( <?php bloginfo('stylesheet_url'); ?> ); </pre></li> <li><strong>如果你使用默认主题</strong>,你会有一行:<br /> <pre><nowiki><link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-layout.css" type="text/css" media="screen" /></nowiki></pre> 你必须将这一行,更改为:<br /> <pre> <nowiki><link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /></nowiki></pre></li> <li> 在index.php中更新wp-comments的包括行。将这个::<br /> <pre><?php include(ABSPATH . 'wp-comments.php'); ?> </pre> 替换为:<br /> <pre> <?php comments_template(); ?> </pre></li> <li>现在保存 <tt>index.php</tt></li> <li>将 <tt>wp-comments.php</tt> 重新命名为<strong><tt>comments.php</tt></strong></li> <li>打开 <tt>wp-comments-popup.php</tt>。在顶上方找到这一行:<br /> <pre>需要 ('wp-blog-header.php');</pre><br />你必须 comment out那一行:<br /> <pre> // require ('wp-blog-header.php');</pre> <tt>wp-comments-popup.php</tt>的顶上方,看起来必须像 :<br /> <pre> <?php /* 不要移除这些行。*/ $blog = 1; //require ('wp-blog-header.php'); add_filter('comment_text', 'popuplinks');</pre></li> <li>保存文件。</li> <li>将<tt>wp-comments-popup.php</tt> 重新命名为'''<tt>comments-popup.php</tt>'''。</li> <li>Add a theme header to 给<tt>wp-layout.css</tt>添加主题标头 (你现在就要复制粘贴这个标头):<br /> <pre> /* 主题名: 我的最初布局 主题 URI: http://myblog.com/ 描述: 你的主题 版本: 1 作者: 你 作者URI: http://myblog.com/ */</pre></li> <li>现在将<tt>wp-layout.css</tt> 重新命名为 '''<tt>style.css</tt>'''.</li> <li>你现在应该有4或者5个文件: :# <tt>index.php</tt> :# <tt>comments.php</tt> :# <tt>comments-popup.php</tt> :# <tt>style.css</tt> :# 如果你使用默认主题,你就有5个文件- <tt>searchform.php</tt></li> <li>现在创建一个文件夹,文件夹名为主题名(例如, <tt>carrots</tt>)并且将那里的前四行添加到文件夹中(如果你使用默认主题,也添加<tt>searchform.php</tt>)。</li> <li>将这个 <tt>carrots</tt> 文件夹FTP到<tt>wp-content/themes/</tt> 文件夹。你在这里应该已经有了个<tt>classic</tt> 文件夹和<tt>default</tt>文件夹。</li> <li>在Presentation面板中,选择当前运行的主题,并且将主题设置到你已经创建的主题中。</li> </ol>
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)