Widgetizing Your Blogあなたのブログwidgetizing
June 15th, 2007 · by David Bradley 2007年6月15日にデビッドブラッドリー
If you have already upgraded to Wordpress 2.2, then this post is not for you.もしすでにWordPress 2.2にアップグレードし、次にこのポストではないです。 But, if you are languishing on an earlier installation and running a theme that does not support widgets, then you may like to check out how to get widgetized.しかし、それ以前の場合は、思い詰めた上でのインストールと実行中のウィジェットをサポートしていないをテーマに、次にをチェックすることがありますようにする方法についてはwidgetizedを取得します。 But, first what are widgets?しかし、最初のウィジェットは何ですか? Well, they’re little snippets of code that sit in their own boxes within your sidebar and can be reordered with a simple drag and drop.まあ、それは小さな断片的なコードが座って自分のボックスをオンにして、サイドバーとreorderedでできる簡単なドラッグアンドドロップします。 So, your search box is at the bottom and your Feedburner count at the top but you want them the other way around?そのため、お客様の検索ボックスの下部には、お客様のFeedburnerの数の上部にして、他の方法でも周りしたいですか? It’sa lot of cutting and pasting with the standard sidebar in Theme Editor, but if your blog is widgetized all you do is drag the search widget to the top of the stack and the Feedburner block to the bottom.これは多くのカットアンドペーストのテーマは、標準のサイドバーにエディタで、しかし、もしあなたのブログにはwidgetized君の仕事は、すべてのウィジェットをドラッグして検索すると、スタックがするFeedburnerのトップへの下にブロックをします。 And save the new settings.新しい設定を保存しています。
The Automattic site has the full skinny onこのサイトには、完全なスキニーをautomattic widgetizing your siteお客様のサイトwidgetizing and provides you with the necessary downloads, so I am not going to repeat their wise words here.と提供してダウンロードするために必要なので、私は行くの賢明な言葉を繰り返してください。 But, one aspect of widgetizing the Sciencebase site earlier this year, prior to the release of version 2.2, was that I simply could not eradicate an orphaned bullet point that was appearing at the top of the sidebar with no entry to which is was associated.しかし、 1つの側面sciencebaseサイトwidgetizing 、今年初めには、バージョン2.2のリリースに先立って、という私を根絶することは絶対にできない孤立した箇条書きされたのは、サイドバーの上部に表示されるとは関連がないのエントリをします。 I messed around with the li and ul tags in the widgets themselves, played with the css in the widgets.php (adding the list-style-type: none; tag to all and sundry to try and delete the little dot).私の周りおかしく李およびULタグは、ウィジェット自体、プレイには、 CSSは、 widgets.php (追加でlist - style -タイプ:なし;タグをすべて削除して、雑にしようとリトルドット)です。 Actually, I grew quite fond of the little critter in the end, but knew that most visitors would prefer not to see the bullet, it was far too distracting.実際、私成長率が非常に好きなの小さな生き物の最後に、ほとんどの観光客が分っていたことを確認するに銃弾が好きではない、それはあまりにもそらさせる。
Finally, after searching the web and reading the manual a dozen times or more I went back to the Automattic site, where it finally dawned on me that a hack they mentioned in regard to formating non-standard sidebars ready to be widgetized might actually work for me too.最後に、ウェブを検索した後に、読書のマニュアルを十数回以上automattic省略しているサイトに行ったが、ここは、最後に分かってきたことをハックに記載されてformatingに関しては非標準のサイドバーの準備ができて仕事を実際にはwidgetizedかもしれないわたしも。
To make widgets work in versions of Wordpress pre-2.2 you have to have a file called functions.php in your theme’s folder.ウィジェットを作るのWordPressのバージョンで動作するためには事前に2.2 functions.phpにはあなたの主題と呼ばれるファイルのフォルダにコピーします。 This file holds nothing but a conditional tag to render the widgetized sidebar as appropriate, but you can add an extra argument or two to make the widget plugin ignore some of the formating in its inbuilt CSS:このファイルは、何もではなく、サイドバーにはwidgetized条件付きタグをレンダリングする必要に応じて、追加することもできますエキストラまたは2つの引数を無視しているウィジェットの差込式は、いくつかのformating inbuiltのCSS :
<?php <ですか? PHPの
if ( function_exists(’register_sidebar’) )もし( function_exists ( ' register_sidebar ' ) )
register_sidebar(array( register_sidebar (アレイ(
‘before_widget’ => ”, // Removes the list tag ' before_widget " = > " 、 / /タグのリストを削除する
‘after_widget’ => ”, // Removes removes the end list entry tag ' after_widget " = > " 、 / /エントリを削除するリストの最後にタグを削除する
‘before_title’ => ”, // Removes the head tag ' before_title " = > " / /頭のタグを削除します。
‘after_title’ => ”, // Removes the end head tag ' after_title " = > " 、 / /頭の最後にタグを削除する
)); ) ) ;
?>ですか? >
Once I’d added this code, fixing the angle brackets to be the actual html enclosures, and reloaded the Sciencebase site up it popped, sans bullet.このコードを追加されました一度私は、固定金具の角度を、実際のHTMLのエンクロージャ、および再読み込みしてポップアップsciencebaseサイト、 sans銃弾です。 I will miss the little critter though.私はミスの小さな生き物かかわらずです。






















2 responses so far ↓ 2つの応答これまでのところ↓
Eliena // eliena / / Jun 17, 2007 at 2:35 pm 2007年6月17日は2:35 pmの
can i implement this code on my blog page ?このコードを実装すれば私のblogページですか?
David Bradley デビッドブラッドリー // / / Jun 17, 2007 at 7:02 pm 2007年6月17日は7:02 pmの
Sorry Eliena, but I don’t understand why you would want to do that in the first place. eliena申し訳ありませんが、私はこれを行うにしたい理由を理解して、最初の場所です。 Blogspot is its own system, presumably you have not above blog folders anyway, so what would you be implementing, regardless of the fact the hack is for Wordpress? BlogSpotは、独自のシステムは、おそらく上記のブログをお持ちでない方フォルダとにかく、これは何がありますの実装に関係なく、実際にはハックがWordPressのですか?
db dBの
Leave a Commentコメントを残す