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.左サイドの例では1位には、サイト全体を横断する8一番最近の記事をかけるかもしれないとすべての項目が含まれます。 In spot two you might have posts only from a category which you’ve labeled “Updates”? 2つのスポットであなたの"更新"の標識したカテゴリーからのみ投稿している可能性がありますか? 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:すべてのハードコアに行く場合は、この事業部のようにしているとのレイアウトを使用する:

  1. //Setup For Example 1 (3 widgets) 1 //Setup For Example 1 (3 widgets)
  2. < div style = "width:100%; padding: 5px; border: 1px solid #FFFFFF;" >
  3. WIDGET 1 CODE HERE
  4. </ div >
  5. < div style = "clear:both; padding-top:5px;" ></ div >
  6. < div style = "float:left; width:200px; padding:5px; border:1px solid #FFFFFF;" >
  7. WIDGET 2 CODE HERE
  8. </ div >
  9. < div style = "float:right; width:200px; padding:5px; border:1px solid #FFFFFF;" >
  10. WIDGET 3 CODE HERE
  11. </ div >
  12. //Setup For Example 2 (4 widgets) 2 //Setup For Example 2 (4 widgets)
  13. < div style = "float:left; width:200px; padding:5px; border:1px solid #FFFFFF;" >
  14. WIDGET 1 CODE HERE
  15. </ div >
  16. < div style = "float:right; width:200px; padding:5px; border:1px solid #FFFFFF;" >
  17. WIDGET 2 CODE HERE
  18. </ div >
  19. < div style = "clear:both; padding-top:5px;" ></ div >
  20. < div style = "float:left; width:200px; padding:5px; border:1px solid #FFFFFF;" >
  21. WIDGET 3 CODE HERE
  22. </ div >
  23. < div style = "float:right; width:200px; padding:5px; border:1px solid #FFFFFF;" >
  24. WIDGET 4 CODE HERE
  25. </ div >

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:ここでは例です:

  1. <?php
  2. //Setting up the new loop of posts 新しい //Setting up the new loop of posts
  3. global $post ;
  4. //Getting Posts - More on this below
  5. $gettingposts = get_posts ( ‘numberposts=5&category=1′ ) ;
  6. //Starting the loop
  7. foreach ( $gettingposts as $post ) :
  8. setup_postdata ( $post ) ;
  9. //Below is a custome output of a link setup です。 //Below is a custome output of a link setup
  10. ?>
  11. - < a href = "<?php the_permalink(); ?>" rel = "bookmark" title = "Permanent Link to &ldquo;<?php the_title(); ?>&rdquo;" >< ?php the_title ( ) ; ? ></ a > t - < a href = "<?php the_permalink(); ?>" rel = "bookmark" title = "Permanent Link to &ldquo;<?php the_title(); ?>&rdquo;" >< ?php the_title ( ) ; ? ></ a >
  12. < div class = "postbreak" >
  13. <?php
  14. //End the loop 終了 //End the loop
  15. endforeach ;
  16. ?>
  17. <?php
  18. //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. 5 //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. //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.
  19. global $post ;
  20. //Getting Posts - More on this below
  21. $gettingposts = get_posts ( ‘numberposts=5′ ) ;
  22. //Starting the loop
  23. foreach ( $gettingposts as $post ) :
  24. setup_postdata ( $post ) ;
  25. //Below is a custome output of a link setup です。 //Below is a custome output of a link setup
  26. ?>
  27. < h3 >< a  style = "font-size:14px;" href = "<?php the_permalink() ?>" rel = "bookmark" title = "Permanent Link to <?php the_title(); ?>" >< ?php the_title ( ) ; ? ></ a ></ h3 > " < h3 >< a  style = "font-size:14px;" href = "<?php the_permalink() ?>" rel = "bookmark" title = "Permanent Link to <?php the_title(); ?>" >< ?php the_title ( ) ; ? ></ a ></ h3 >
  28. <?php
  29. //Display a clip from the post
  30. the_excerpt ( ) ;
  31. //End the loop 終了 //End the loop
  32. endforeach ;
  33. ?>

Creation of intricate homepages can be further enhanced by using multiple wordpress template tags .複雑なホームページの作成をさらに複数のワードプレスを使用して拡張することができますタグのテンプレートです。 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 .すべての最近の投稿が表示されますので、 2番目の例では、私が使用して、再びこの時期のカテゴリを指定しない( )と表示さ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関数5と8以外のすべてのカテゴリーから3記事が表示されます:
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. Wordpressの場合は、他の機能で遊ぶget_postsが、これはサポートdoesn't 、彼らがありません。 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.通常は、 readmeの中にそのようなコードを確認したり、インストールファイルのメモは、ほとんどのプラグインが付属しています。

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.彼と彼の彼のメインページに各カテゴリーのための彼の最近の投稿している彼のイベント、更新情報の更新のために使用して別のカテゴリから右上にあるフィードを表示されており、一般的なニュースです。


1 Trackback(s) 1トラックバック(秒)

  1. Aug 27, 2008: Wordpress Wednesdays: Widgetized Front Page | BlueFur.com 2008年8月27日: ワードプレス水曜:ウィジェットフロントページ| BlueFur.com


1 Comment(s) On 1コメント(秒)

"Wordpress Custom Home Page Design - Widgetized Front Page" " Wordpressのカスタムホームページのデザイン-ウィジェットフロントページ"
  1. MyAvatars 0.2 Todd - Aug 26, 2008 トッド -2 008年8月2 6日

    Thanks for the plug man, and the tips!男性用プラグインのおかげで、とヒント! I might try adding some more functions to my home page!私は自分のホームページにいくつかのより多くの機能を追加してみてください!



Leave A Comment:コメントを残す:

Comments RSS Feed コメントのRSSフィード

6 Plus 2 = 6プラス2 =

Custom Theme by Rob Malon | Content & Design © 2008 - Rob Malon [dot] Com. カスタムテーマロブマロン|コンテンツ&デザイン© 2008 -ロブマロン[ドット]コム。 "));
"));