站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WorPress:Designing Themes for Public Release
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
==Consider the Details== There are a lot of details that have to be taken into consideration when designing your WordPress Theme for public release. Here are a few to consider. ===Consistent and Standard Fonts=== As you work your Theme, [[WordPress:Playing With Fonts|fonts play a critical part]] in the design. Many inexperienced web page designers present themes and styles with only one font. Not just an overall font style for the whole page but ONE font. In the body style tag it may say: <pre>body {margin: 0; font-family: "Trebuchet MS", sans-serif; font-size: 1em;...}</pre> What happens if the user doesn't have Trebuchet on their computer? It happens every day. If that font isn't on the user's computer, the system default shows up which is often Arial or some similar sans-serif font. If you like the look, great, because just about everyone has it, but if you want Trebuchet and you really want your fonts to have a specific look, then you have a problem. To increase the chances of a font similar to the one you really want showing up on the page when it displays, add more choices to the font-family like this: font-family: "Trebuchet MS", Verdana, Futura, Arial, Helvetica, sans-serif; If the browser can't find Trebuchet, it looks for Verdana, and if can't find that, it looks for Futura (Mac systems), and so on. That should cover all your bases. Also remember that while there are some fonts which are common on Windows systems, there are other computer systems out there like Linux and Mac. Consider using fonts that will also work on their machines, too. As you choose your fonts and design your Theme, make sure you [[WordPress:Playing With Fonts|choose fonts]] that are readable and easy -to-read, keeping font-sizes large to avoid eye-strain yet sized to fit within your design. ===Comment Comment Comment=== Have you looked under the hood of a racing car lately? The bells and whistles inside are a nightmare to figure out. Remember the first time you looked at PHP, CSS, or HTML code? Bet that gave you a few moments of hysteria. When you are releasing your Themes and styles to the public, remember the user may take a peek under the hood and run screaming from the room, too. [[WordPress:Commenting Code|Comments are part of code]] that helps the designer and the user figure out what is what. Comments help users identify DIVs that cross templates, when a template begins and ends, and any changes that indicate you, the designer, has modified something that makes it different from the original code. Help your users by commenting as much as possible to helps them find the different sections and use your Theme with ease. ===Lean and Mean CSS Style Sheet=== WordPress stresses that code and style files should validate and be laid out with a lot of tabs so they are easy to read. The [http://w3c.org/ World Wide Web Consortium] and the [http://www.webstandards.org/ Web Standards Organization] ''stresses'' that all web page code be compliant with their standards. If you are going to get into this, you should familiarize yourself with the most basic of these standards. One of those standards is to present a clean and optimized style sheet and HTML code. While WordPress contests tend to be lenient on this subject, other web page design contests don't. Their motto tends to be "a clean and tight code is a work of art, too". Basically, it means doing [[WordPress:WordPress Housekeeping|some housekeeping on your code]] before you release it. Yes, you will need to validate it and test it across browsers, but let's start with some simple cleaning. Every space, character, and bit in your code and style sheets add up to bytes. That sentence came to about 64 bytes. Each byte of information adds up and the larger they are, the longer they take to load. You do yourself and your users a favor by keeping your file sizes down to byte sized sizes. So where do all these bandwidth wasters hide? If you have set your code to look pretty with lots of indents, have you checked to see if there are any TAB codes at the end of the line before the line break? I find a lot of these. You don't need a TAB before a line break, only after, but somehow, these sneak into the code. Using spaces to line up code adds to the size. A TAB is considered one character in most editors, but the five spaces that copy the TAB indent takes up five characters. Using double spaces instead of single spaces in your code and styles adds up, too. Using a good search and replace capable text editor, you can quickly clean these up, making your styles and code optimized for fast loading. ===Condense and Use Shorthand=== It's a good idea to use [[WordPress:CSS Shorthand|shorthand for your CSS]]. While it isn't a required standard, it is part of code optimization. Use this technique with caution as some browsers can't handle it, typically "older" browsers. If you are unfamiliar with CSS shorthand, we've put together a [[WordPress:CSS Shorthand|short tutorial for you]]. ===Validate! Validate! Validate!=== Make sure your codes and styles validate across the board. That means they have to meet the "strict" standards set by the [http://www.w3c.org/ W3C Organization] and pass a variety of validations for CSS and HTML. Not all validators check for the same things. Some only check CSS, others HTML, and others for accessibility. If you are sincere in presenting solid code to the public, test your code with several validators. Validation doesn't just mean putting your pages through some web driven testers. It also means test-driving it with friends, relatives, co-workers, and strangers you meet on the street. Everyone has a little different system, so ask for others to test-drive your styles or themes before you make them public. [http://wordpress.org/support/forum.php?id=11 The Your WordPress section] in the [http://wordpress.org/support/ WordPress Forums] is dedicated to checking out your site by WordPress volunteers while you are working on it, when you have trouble, or just to say ooooh and ahhhhhhh. If you are unfamiliar with how to validate your web pages and style sheets, we've put together a [[WordPress:Validating a Website|list of resources and information]] to help you. ===CSS and HTML Bugs=== WordPress Themes and styles are diverse examples of the brilliant and imaginative WordPress users out there. What all of them have in common as they hold the design concept in their head and work long hours to convert it into code that matches their imagination is.....browser bugs. You work for three days to make it beautiful in Microsoft Internet Explorer, take a look at the same site in Firefox and it looks different. In fact, things don't line up right. Or you designed it to work in Opera, but when you view it in Internet Explorer, the sidebar is now half off the screen. Before you pull out your hair, remember that others have suffered before you and you are not alone. Check out these resources for help on solving the many CSS, HTML, and browser bugs that are out there. * [[WordPress:CSS|WordPress CSS Information and Techniques]] * [[WordPress:CSS_Fixing_Browser_Bugs|CSS: Fixing Browser Bugs]] * [[WordPress:CSS_Troubleshooting|CSS: Troubleshooting]] * [http://www.positioniseverything.net/ Positioniseverything.com] ===What Else...?=== These are a few of the most common things to take into consideration when presenting your themes or styles to the public, but it is only the tip of the iceberg. Remember, if there is a problem with your theme, users should begin their search for help on your website, but they often turn to the [http://www.wordpress.org/support/ WordPress Forums]. The more consistent with the default codes and style references, the faster users can get the help they need if there is a problem. We know that you read through this article and followed all of these recommendations to the letter, users will come to the WordPress Forums to brag and show off instead. The better designed your Theme is, the more web standard and cross-browser compliant, the more successful your Theme may be. As we said, there are no hard and fast rules for design, only guidelines for the code under the hood. The sky is the limit.
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)