So you’ve managed to specify a custom front page in your Wordpress setup by going to: [settings], [reading], [front page displays], ["A static page" - Radio Button].所以,你已经成功地指定一个自定义的头版在您的WordPress的设置要: [设置] , [阅读] , [头版显示] , [ “静态页面” -单选按钮] 。What now?怎么办?Who cares if you can create a custom front page with static content on it.谁在乎如果你可以创建一个自定义头版与静态内容上。We want some cool, more advanced, wigetized goodies to pull together our blog on a dynamic basis.我们要冷静一些,更先进,更wigetized好玩齐心协力我们的博客对一个充满活力的基础。If you’ve seen the new front page of RobMalon.Com then you’ll have an idea of some of the functions I’m about to teach you so that you can setup something similar on your blog.如果你已经看到了新的头版RobMalon.Com就会有一个想法,一些职能我要教你,让您可以安装类似的在你的博客。
Custom Home Page Design & Layout自定义主页的设计与布局
An important first step to this is drafting out what you want to do.一个重要的第一步,这是起草了你想做的事情。Organize what widgets are going to go where.组织是什么工具去哪里。That’s difficult if you don’t know what Wordpress is capable of.这是困难的,如果你不知道WordPress的能力。So, to briefly go over what we have at our hands, plan out your front page content based on these questions:所以,简单地去我们已经在我们手中,计划您的头版内容,根据这些问题:
What categories if any are important enough to to give them their own mini feed on the front page?哪些类别如有的话是重要的足以使他们自己的小型饲料的头版?
How many recent articles in each widget do you want to display?有多少最近的文章在每个部件你想显示?Offsetting this in various places will allow you to tweak a homepage to get it to balance nicely where it otherwise wouldn’t because of uneven content in columns.而另一方面在不同的地方,您就可以调整主页使其很好的平衡,否则将不会因为不均衡的内容栏。
Do you want to display the first 200 characters (without links/images) of each article?你想显示的第一个200个字符(不链接/图片)的每篇文章?Consider how this will effect the previous point I made.考虑如何将影响以前的一点,我的讲话。
Design and architecture.设计和建筑。- See the layout idea to the right for a visual example. -见的布局设想的权利的视觉例子。In spot one in the left side example you might put the 8 most recent articles across the entire site and include all categories.在现场一个在左侧,例如,您可以把最新的第8条在整个网站,包括所有类别。In spot two you might have posts only from a category which you’ve labeled “Updates”?在现场两个您可能只能从职位类别您已标示为“更新” ?Or perhaps a category which you use to tag your latest “Video” posts?或者一类您使用标记您的最新的“视频”帖子?Then in category 3 a list of articles which you consider to be “Featured” articles.然后在第3类的文章的列表,您认为是“特色”文章。The list is endless with options.这份名单是无止境的选择。When you go to setup your page like this, a lot is determined on how well you categorize your current posts.当您进入您的网页上设置这样的,很多是关于如何确定以及您对您目前的分类职位。For example, I implemented a featured area in the top tabbed area on the front page.例如,我执行了一个功能区顶端标签领域的头版。I had to go back, create a new category, and apply that category to existing posts as I saw fit.我不得不回去,创建一个新的类别,并运用这一类现有的职位,我认为合适的。Then, from now on, I simply add it as I go when I write a post that I want to show up in the “featured” widget on the front page.然后,从现在起,我只想补充,因为我去时,我写文章,我要显示在“功能”部件的头版。
While you’re planning out your widgets, don’t forget, you can use code from other plugins as well.当你规划你的工具,不要忘记,您可以使用其他代码以及插件。More about that in a bit.更多有关,在位。
Table Or CSS Setup表或CSS安装
Now that you have that down, its time to implement some layout code.现在您已经说了,它的时间来执行一些布局代码。If you’re new to this, set this up in a table.如果您对这一新的,这项设定在一个表中。If you’re looking to go all hardcore, then use a layout with div’s like this:如果您要寻找到所有的铁杆,然后使用一种布局与区这样的:
//Setup For Example 1 (3 widgets)
< div style ="width:100%; padding: 5px; border: 1px solid #FFFFFF;">
WIDGET 1 CODE HERE
</ div >
< div style ="clear:both; padding-top:5px;"></ div >
< div style ="float:left; width:200px; padding:5px; border:1px solid #FFFFFF;">
WIDGET 2 CODE HERE
</ div >
< div style ="float:right; width:200px; padding:5px; border:1px solid #FFFFFF;">
WIDGET 3 CODE HERE
</ div >
//Setup For Example 2 (4 widgets)
< div style ="float:left; width:200px; padding:5px; border:1px solid #FFFFFF;">
WIDGET 1 CODE HERE
</ div >
< div style ="float:right; width:200px; padding:5px; border:1px solid #FFFFFF;">
WIDGET 2 CODE HERE
</ div >
< div style ="clear:both; padding-top:5px;"></ div >
< div style ="float:left; width:200px; padding:5px; border:1px solid #FFFFFF;">
WIDGET 3 CODE HERE
</ div >
< div style ="float:right; width:200px; padding:5px; border:1px solid #FFFFFF;">
In case you’re confused, all this code is going to go into a “page” which you should have already specified as the homepage.如果你感到困惑,所有这一切代码是去到一个“页”你应该已经指定为主页。If not, its not a bad idea to practice on a non-frontpage which is unpublished so you can experiment without putting an existing blog into chaos.如果不是,它不是一个糟糕的主意,以实践非FrontPage中是未发表的,您可以把实验没有一个现有的博客陷入混乱。
Coding The Widgets编码的工具
Then you have some options for each widget.然后,你有选择的每个部件。What you need to do is tell the proper Wordpress function to loop through the posts that you’d like to display.你需要做的是告诉适当的WordPress的功能,通过循环的职位,你想要显示。Here are the examples:这里是例子:
- < a href ="<?php the_permalink(); ?>" rel ="bookmark" title ="Permanent Link to “<?php the_title(); ?>”">< ?php the_title ( ); ? ></ a >
< div class="postbreak">
<?php
//End the loop
endforeach;
?>
<?php
//This bit of code will loop through 5 recent articles covering all categories and post the_excerpt() - A 200 character clip from the post that excludes any html in from those first lines.
Creation of intricate homepages can be further enhanced by using multiple wordpress template tags .创作的错综复杂的网页还可以进一步提高使用多个WordPress的模板标记。All the documentation is there, simply call the functions with the parameters you want (as available in each template tag).所有文件已经存在,只是电话的功能的参数您想要(如可在每一个模板标记) 。In the example above I first show a way to iterate through links in a particular category using the template tag get_posts .在上面的例子中我首先表明,以迭代通过联系某一类使用模板标记get_posts 。In the second example I use it again but this time don’t specify a category (so it displays all recent posts) and show the_excerpt() with it which takes a clipping of the current post in the_loop .在第二个例子,我再次使用它,但这个时候不指定类别(以便它会显示所有最近的职位) ,并显示the_excerpt ( )与它的需要裁剪目前的职位the_loop 。
Look through the get_post documentation and append the proper variables to adjust the output you’d like to see.期待通过get_post文件和附加适当的变量来调整输出您想看到的。Fro example, the following get_post function will display 3 posts from all categories except 5 and 8:往复例如,下面的get_post功能会显示3个各类除第5和第8 : get_posts(’numberposts=3&category=-5,-8′);get_posts ( ' numberposts = 3 &类=- 5 , -8 ' ) ;
If you want to find the ID of a category, post, or page do the followign:如果你想知道的ID一类,张贴,或网页做followign :
log into admin.登录到管理员。
Navigate to the manage tab.转到管理标签。
Click categories (or posts or pages)按类别(或职位或页)
Hover over or click on the proper category, post, or page you wish to know the ID of悬停或按一下适当的类别,张贴,或网页中,您想知道的ID
In the status bar (if you’re hovering) or in the Address Bar (if you clicked) you should see a link that looks similar to this:在状态栏(如果你悬停) ,或在地址栏(如果你点击) ,你应该会看到一个链接,看起来与此类似: http://yoursite.com/wp-admin/categories.php?action=edit&cat_ID=11
In the above example I was in categories.在上面的例子,我在类别。The category I chose has an idea of “11″.这一类我选择了一个想法, “ 11 ” 。Now I can exlicitly include or exclude it.现在我可以exlicitly包含或排除它。In some cases you’ll want to do this with posts and/or pages as well.在某些情况下,你会想这样做的职位和/或网页,以及。get_posts doesnt support this, but if you play with other Wordpress functions, they sometimes do. get_posts doesn't支持这项工作,但如果你发挥与其他WordPress的职能,他们有时会做。Check the template tag documentation on a per function basis.检查模板标记文件的基础上每功能。You’ll at least know how to get the ID’s now without having to log into your mySQL database.你至少知道如何让ID的现在,而不必登录到您的MySQL数据库。
Plug-ins插件
You may need a plug-in called Exec-PHP installed on your blog so that you can execute the above PHP code inside posts.您可能需要一个插件所谓Exec的, PHP的安装在您的博客,这样您可以执行上述PHP代码内员额。Be careful about installing this plug-in if you have other people managing your blog with you though.小心安装此插件如果您有其他人管理您的博客与你的。If so you can setup custom privileges.如果是这样的话,您可以设置自定义的特权。If not then just make sure its installed and activated.如果不是那么公正,确保其安装和激活。
I’m sure you’ve seen countless other plugin’s out there which provide you with a snippet of code which you can use in your sidebar.php file inside your theme folder.我敢肯定你会看到无数其他插件的有这为您提供一小段代码,您可以使用您的sidebar.php档案内的主题文件夹中。You can also use that code within any of the widgets you create on your homepage within those blocks.您还可以使用代码在任何的工具您建立在您的主页在这些区块。You can usually find code like that inside the readme or install notes file that most plug-in come with.您通常可以找到这样的代码内的自述或安装说明文件,大多数插件配备。
Examples范例
On the left is an example of my front page from when I recently redesigned RobMalon.Com .在左边是一个例子,我从头版当我最近重新设计的RobMalon.Com 。I also recently helped a personal friend of mine create a similar setup with his page at ToddRecommends.TV who does Live streams and talks Movies and Tech.最近我也有助于个人的好朋友建立一个类似的设置与他的网页ToddRecommends.TV谁做现场流和会谈电影和技术。You can see a clip of what his front page currently looks like on the right-hand side.你可以看到一个夹子是他目前头版上看起来像右侧。He has his recent posts for each of his main categories on his page and is displaying a feed on the top right from another category which he uses for updates about events, updates, and general news.他最近为每个职位的主要类别对他的网页,并展示了饲料的右上角的另一个类别,他使用的更新事件,更新,和一般的消息。
Paint program via web browser: http://www.pixlr.com/app/画图程序通过网络浏览器: http://www.pixlr.com/app/
Android phone can be used as a handheld remote for your PC or Mac - http://twurl.nl/nrg5fz.机器人的电话可以作为一个手持遥控器为您的PC或Mac -h ttp://twurl.nl/nrg5fz。Controls your cursor, media etc.控制您的光标移动,媒体等
9 New & Popular Wordpress Plugins In October 2008 http://tinyurl.com/5qmb4v 9日纽约和人民WordPress的插件在2008年10月http://tinyurl.com/5qmb4v
Google Android appears to be really taking off now.谷歌机器人似乎是真的走了。http://www.androidapps.com - Lots of cool apps already. http://www.androidapps.com -许多应用程序已经降温。Maybe I'll pick one up soon.也许我会选择一个很快。
Wordpress Usability Testing Report: 2.5 - http://twurl.nl/oneas2 - Ironically I almost went to college at Ball State. WordPress的可用性测试报告: 2.5 -h ttp://twurl.nl/oneas2-具有讽刺意味的我几乎上了大学在球的国家。
感谢您名男子的插件,并提示! 我可以添加一些更多的功能,我的主页!