Free Checking for Bloggers - Sign up in 5 Minutes! 無料のチェックをブロガー-サインアップで5分!
Powered by MaxBlogPress 電源をmaxblogpress

非常に簡単WordPressのテーマの刻み目:詳細カテゴリ画像| jtprattのブログミス
jtprattのブログミス


Home » Very Easy Wordpress Theme Hack: Show Category Images »非常に簡単WordPressのテーマの刻み目:詳細カテゴリ画像



Posted in: に投稿された:

ブログ-セットアップの作成カテゴリのイメージブログ-ミスのカテゴリのイメージWordPressのカテゴリのイメージ
5,047 views再生回数5047


Please note: This page was originally written in English.ご注意ください:このページは、もともと英語で書かれています。

The original post can be viewed表示できるよう、元の投稿 hereここで .です。

Please note: This page was originally written in English.

The text has been translated using an online service such as Google or Babelfish.

The original post can be viewed here.


I’m going to show you how to add some simple PHP code to your Wordpress template and make linked images appear instead of text for your categories in posts.私は君を表示するに追加する方法をいくつかの簡単なPHPコードを指定してリンクしてWordPressのテンプレートの代わりに画像が表示されるテキストのカテゴリーを投稿してください。 All you need to know is simple PHP, some basic HTML, and how to make your own graphics.すべての必要な単純なPHPを知っては、いくつかの基本的なHTML 、との作り方を、独自のグラフィックです。

**UPDATE** May 2008 **更新** 2008年5月
As the last comment at the end of this page shows there is now aとしての最後のコメントの最後には、次のページを示している点は、現在では Category Icons Wordpress Plugin カテゴリのアイコンWordPressの差込式 you can download to install to manage your category icons right in your dashboard.をインストールするダウンロードすることができますしてカテゴリを管理するダッシュボードのアイコンを右にしています。 If you prefer to hack your theme, the code below will work just fine!お好みのテーマをハックしている場合、以下のコードはとても元気ですよ。 The cool thing about the plugin is that they give you ways to do one or multiple category icons, but also a methods for putting icons with your categories in the side bar as well!差込式の冷たいものを参照するには、それらを与える方法でこれを行うに1つまたは複数のカテゴリのアイコンは、パットの方法ではなく、アイコンにして作成カテゴリには、サイドバーとしても! I’m always very grateful when a good plugin come along!私はいつも非常に感謝するときに沿って良い差込式来る! Now back to the original post…今すぐ省略して、元のポストを…

Have you ever wanted to hack Wordpress and just make it do something you always wanted it to do?これまでに指名手配することだけをハックWordPressのと、常に何かを指名手配してですか? I think of things I want it to do all the time but don’t always have the hours to devote to finding the answer.のことをしたいと思うことしかし、これを行うには限らないのすべての時間を割く時間は、その答えを見つける。 I’ve searched for PHP code snippets for Wordpress and tutorials and how-to articles as well and haven’t seen much that really helped me.私のWordPressの捜索は、 PHPコードスニペットとチュートリアルを、どのように記事にも及び、見たことがないくらいに本当に助けてくれた。 Until today - when I read今日にいたるまで-を読んだとき the tutorial page at WPDesigner today今日、チュートリアルのページをご覧wpdesigner .です。 I didn’t get exactly the code I needed, but pretty close.私は、希望どおりのコードを私は必要に応じて、しかし、かなりそれに近いです。 I just needed to hack it a bit to get it to do what I wanted.ただ必要に応じてビットをハックしてこれを行うには何を得ることしたかった。

First, this Wordpress tutorial hack assumes a few things.第一に、このチュートリアルの刻み目のWordPressのいくつかの事を想定します。

  1. You’ve modified your Wordpress template code before WordPressのテンプレートのコードを変更して前に
  2. You can modify simple PHP単純なPHPを変更することができます。
  3. You can write simple HTML簡単なHTMLの書き込みすることができます。
  4. You can make your own graphics独自のグラフィックスにすることができます。

First things first - here’s the code:まず行うことの最初の-ここはコード:

 <h3><b>Posted in:</b></h3> <?php foreach((get_the_category()) as $cat)  {  $catname =$cat->category_nicename;  echo "<a href\"/category/";  echo $catname;  echo "/\">";  echo "<img src\"/wp-content/cat-icons/";  echo $catname;  echo ".png\" alt=\"$catname category image\" border=\"0\" /></a>\n";  } ?><br /> <h3>に投稿された<b>ダウンロード: < / b > < /トンH3 > <ですか? PHPのforeach ( ( get_the_category ( ) )として$猫) ( $ catname = $猫- > category_nicename ;エコー" <するhref \ " /カテゴリ/ " ;しますecho $ catname ;エコー" / \ " > " ;エコー" <スペースsrc \ " / wp-content/cat-icons / " ;しますecho $ catname ;エコー"です。 PNG形式\ " alt = \ " $ catnameカテゴリイメージ\ "国境= \ " 0 \ " / > < / > \ n " ; )ですか? > <br /> 

I hacked this code from this tutorial page on WPdesigner私、このコードをハッキングこのチュートリアルのページをwpdesigner .です。 The code they had was only good to display one category per post.彼らは良いのコードを表示する1つのカテゴリには1ポストを作成。 I hacked it because my blogs all have posts assigned to multiple categories.私のすべてがハッキングので私のブログの記事を複数のカテゴリーに割り当てられている。 Also, I wanted the images to all be linked so people can just click them and go right to that category page.また、すべての画像をしたかったので、人々にリンクして行くだけで権利をクリックしてそのカテゴリのページをご覧ください。 Let’s look at the pieces of this code you might need to modify.作品を見てみましょうは、次のコードを変更する必要があるかもしれません。

In line 1, you might want change “Posted in:” to alternate text like “Filed under:”, etc. 1行目で、変更したいかもしれません"に投稿された: "代替テキストを次のように"に提出されて: "など

In line 5, if your permalink structure is different than the default, you may need to change /category/ to what you are using. 5行目、もしあなたのpermalinkの構造が異なっており、デフォルトを変更する必要があるかもしれません/カテゴリ/には何を使用しています。

In line 8 change /wp-content/cat-icons/ to wherever you will be storing your category icons in your site. 8行目を変更/ wp-content/cat-icons /をどこに表示されるアイコンをあなたのサイトのカテゴリを保管してください。

In line 10, if you are using gif’s or jpg’s change .png to your graphic file format.に沿って10日のを使用する場合はgifまたはjpgの変更です。 PNG形式のグラフィックファイル形式にしています。

Now all you have to do is create one image for every category you have an place them in the folder you just created on the server.今すぐあなたがこれを行うには、カテゴリごとに1つの画像を作成する必要がそのフォルダに置いて、サーバー上の先ほど作成します。 Make sure that the graphics are named exactly as your categories, and if your categories have multiple words just add a hyphen in between each word.ことを確認して、グラフィックスの名前を正確にしてカテゴリ、および複数の単語だけが使用して作成カテゴリを追加する各単語の間にハイフンを使用します。 That’s it!それだよ! All you have to decide now is where you want these category icons to appear, before or after your post - and add them into the appropriate place.すべてを決定する必要がしたい今すぐには、これらのカテゴリのアイコンを表示するには、前または後にして作成-を追加して、適切な場所です。 I placed mine just after the title of the post on my single post pages - as you can see at the top of the post on this page.私のすぐ後に置か鉱山のタイトルを投稿して1つの投稿ページ-としての上部に表示することができます。このページするには、投稿します。 You can hack this category icon code a hundred other ways to do what you want.このカテゴリのアイコンをハックすることができますコードを他の方法でこれを行うには何百人を選択します。 I think in the future I’m going to use it to replace the text category links in my sidebar.私の将来を考えるのに行くんだ、テキストを使用することを置き換えるに私のサイドバーでカテゴリへのリンクです。 The only caveat to this (and the code hack above) would be the fact that if you don’t have an image a text link will display (in FF, or broken image in IE).警告だけに、この(上記のコードがハック)のは事実のイメージをお持ちでない場合、テキストリンクが表示されます( ffか、またはイメージが壊れてIE )のです。 So - if you create new categories in the future, make sure you create a new image for each.これ-新しいカテゴリーを作成する場合は将来的には、新しいイメージを作成することを確認し、各です。

My Blogging Mistake for this post is that I didn’t decide to customize and hack my Wordpress Theme before now to create my own layout.ブログ作成ミスこの投稿は、それまで知らなかった私の決心をハックWordPressのテーマをカスタマイズして今すぐ前に自分自身のレイアウトを作成する。 Do you have a question or a new way to hack up this wordpress category icon PHP code?ある質問をお持ちですか、新しい方法をめった切りにするこのWordPressカテゴリのアイコンをPHPコードですか? Comments and post it now!コメントを投稿することを今すぐプレイ!


18 Responses to “Very Easy Wordpress Theme Hack: Show Category Images” 18反応を"非常に簡単なWordPressのテーマの刻み目:詳細カテゴリ画像"

  1. The Smorgasbord のバイキング Has the following to say...には、以下のように言ってやるが...

    This was very easy to do - thanks for the code and the tip!これは非常に簡単にこれを行うに-コードとの先端てくれてありがとう!

    The Smorgasbord’s last blog post.. のバイキングの最後のブログの投稿.. Convert Vinyl Records to MP3 ビニールのレコードをmp3に変換する

  2. 50 tips y trucos para optimizar Blogger y WP | Blog en Serio 50のヒントy trucos para optimizar BloggerのyのWP |ブログアンセーリオ Has the following to say...には、以下のように言ってやるが...

    [...] Imágenes para las categorías [...] [...] imágenes paraラス部門[...]

  3. Blogbuster: блоги, blogs, blogging, RSS, Wordpress, социальное blogbuster : блоги 、ブログ、ブログ、 RSSを使って、 WordPressのは、 социальное Has the following to say...には、以下のように言ってやるが...

    25 неотстойных хаков для WordPress 25 неотстойных хаков дляのWordPress

    Динамическое слайдшоу в шапке — позволяет крутить картинки в шапке вашего блока, придает динамику; демоверсия. динамическое слайдшоу в шапке -п озволяетк рутитьк артинкив ш апкев ашегоб лока、 п ридаетд инамику; д емоверсияです。
    Пузырь комментариев — гр… пузырь комментариев -г р…

  4. 25 hacks para dinamizar seu Wordpress! 25 hacks para dinamizar移動してWordPressの! — Bytes a Go-go! -バイトをゴーゴー! Has the following to say...には、以下のように言ってやるが...

    [...] Imagens para categorias. [...]イメージparaカテゴリです。 Adiciona imagens para cada categoria do seu blog e são mostradas no post se você preferir.それぞれのカテゴリーにAdicionaイメージ移動してブログのメール投稿- MUデジタルオーディオシステムpreferir S縊mostradasない。 [...]

  5. Blog Verde » 25 Hacks pra dinamizar o Wordpress ブログのベルデ» 25 hacks dinamizarまたはWordPressのプラ Has the following to say...には、以下のように言ってやるが...

    [...] Imagens para categorias. [...]イメージparaカテゴリです。 Adiciona imagens para cada categoria do seu blog e são mostradas no post se você preferir.それぞれのカテゴリーにAdicionaイメージ移動してブログのメール投稿- MUデジタルオーディオシステムpreferir S縊mostradasない。 [...]

  6. 63 Essential Wordpress Hacks, Tutorials, Help Files and Cheats | Speckyboy - Wordpress and Design 63欠かせないのWordPress hacks 、チュートリアル、ヘルプファイルや不正行為| speckyboy -W ordPressのとデザイン Has the following to say...には、以下のように言ってやるが...

    [...] Show Category Images (Source: [...] [...]詳細カテゴリ画像(出所: [...]

  7. 63 essenziali Wordpress Hacks, Tutorials, Help Files e Cheats : technorati.it 63 essenziali WordPressのhacks 、チュートリアル、ヘルプファイルをメール不正行為: technorati.it Has the following to say...には、以下のように言ってやるが...

    [...] Show Category Images (Source: [...] [...]詳細カテゴリ画像(出所: [...]

  8. Wordpress Tutorials/Hacks « The house of software freeware WordPressのチュートリアル/ hacks «の家のソフトウェアのフリーウェア Has the following to say...には、以下のように言ってやるが...

    [...] Show Category Images (Source: [...] [...]詳細カテゴリ画像(出所: [...]

  9. Mastering Your WordPress Theme Hacks and Techniques ハック、技術を習得してWordPressのテーマ Has the following to say...には、以下のように言ってやるが...

    [...] 10)Show Category Images- How to add some simple PHP code to your WordPress template and make linked images appear instead of text for your categories in posts. [...] 10 )詳細カテゴリに追加する方法をいくつかの簡単な画像にするPHPコードを指定してリンクしてWordPressのテンプレートの代わりに画像が表示されるテキストのカテゴリーを投稿してください。 [...]

  10. letrodectus letrodectus Has the following to say...には、以下のように言ってやるが...

    Great hack!素晴らしいハック! thanksありがとう =

  11. 63 Essential Wordpress Hacks, Tutorials, Help Files and Cheats | Speckyboy - Wordpress and Design » 쟈스민(JASMIN) 63欠かせないのWordPress hacks 、チュートリアル、ヘルプファイルや不正行為| speckyboy -W ordPressのとデザイン» 쟈 스 민 (ジャスミン) Has the following to say...には、以下のように言ってやるが...

    [...] Show Category Images (Source: [...] [...]詳細カテゴリ画像(出所: [...]

  12. paidnetpedia.com paidnetpedia.com Has the following to say...には、以下のように言ってやるが...

    [...] sticky”- When we need to have certain articles ’stay at the top’ longer than others. [...]粘着性" -私たちする必要があるときに、特定の記事のご滞在の上部に'他人よりも長いです。 10)Show Category Images- How to add some simple PHP code to your WordPress template and make linked images appear instead [...] 10 )詳細カテゴリに追加する方法をいくつかの簡単な画像にするPHPコードを指定してリンクしてWordPressのテンプレートの代わりに画像が表示さ[...]

  13. Submarine 潜水艦 Has the following to say...には、以下のように言ってやるが...

    Hiやあ

    here is a plugin that do the job :次に示すのは、差込式には、仕事:

    Category Icons Pluginより作成カテゴリのアイコン差込式 .です。

  14. Remkus remkus Has the following to say...には、以下のように言ってやるが...

    That is a very nice Hack!それは非常にニースハック! I realize there is a plugin now, but I think I am going to just edit this in one of my projects.私には、プラグインを実現する、しかし、私は行くと思うように編集するだけでこれを私のプロジェクトの1つです。 Thanks for writing it down!書き留めいただきありがとうございます!

  15. What is Category Icons ? カテゴリのアイコンは何ですか? « Category Icons «カテゴリのアイコン Has the following to say...には、以下のように言ってやるが...

    [...] : JTPRATT’s Blogging Mistakes ( here & here ), Performancing Helping Bloggers [...] [...] : jtprattのブログの過ち(ここ&ここ) 、 Performancing -支援ブロガー[ ...]

  16. 155 Wordpress Resources, Tutorials, Plugins, Themes, AJAX, Podcasting…WP Monster List | Speckyboy - Wordpress and Design 155 WordPressのリソース、チュートリアル、プラグイン、テーマ、 ajax 、ポッドキャスティング… WPのモンスターリスト| speckyboy -W ordPressのとデザイン Has the following to say...には、以下のように言ってやるが...

    [...] 84. [...] 84 。 No More CSS Hacks.これ以上のCSS hacks 。 85. 85 。 Create a Dynamic Sticky.動的な付箋を作成する。 86. 86 。 Styling Individual Posts Using the_ID. the_idデザインを使用して個々の投稿です。 87. 87 。 Show Category Images.詳細カテゴリイメージです。 88. 88 。 Separate WordPress Comments and Trackbacks.別のWordPressのコメントとトラックバックします。 89. 89 。 Customize your WordPress Login. WordPressのカスタマイズしてログインしてください。 90. 90 。 Date Image [...]日付のイメージ[...]

  17. 155个 WordPress 资源、指导、插件、主题、AJAX、播客…… —— WP 详细清单(译) | 晴天里的一道�… 155个WordPressの资源、指导、插件、主题、 ajax 、播客… … -详细清单のW P(译) |晴天里的一道… Has the following to say...には、以下のように言ってやるが...

    [...] 84. [...] 84 。 No More CSS Hacks 85.これ以上のCSS hacks 85 。 Create a Dynamic Sticky 86.ダイナミックな付箋を作成する86 。 Styling Individual Posts Using the_ID 87.スタイリングthe_id 87を使用して個々の投稿です。 Show Category Images 88.詳細カテゴリ画像88 。 Separate WordPress Comments and Trackbacks 89.別のWordPressのコメントとトラックバック89 。 Customize your WordPress Login 90. 90 WordPressのカスタマイズしてログインします。 Date Image [...]日付のイメージ[...]

  18. 155个 WordPress 资源、指导、插件、主题、AJAX、播客…… —— WP 详细清单 | Awesomer 155个WordPressの资源、指导、插件、主题、 ajax 、播客… … -W Pの详细清单| a wesomer Has the following to say...には、以下のように言ってやるが...

    [...] Hacks84. [...] hacks84です。 No More CSS Hacks85.これ以上のCSS hacks85です。 Create a Dynamic Sticky86.動的sticky86を作成する。 Styling Individual Posts Using the_ID87. the_id87デザインを使用して個々の投稿です。 Show Category Images88.詳細カテゴリimages88です。 Separate WordPress Comments and Trackbacks89.別のWordPressのコメントとtrackbacks89です。 Customize your WordPress Login90. login90 WordPressのカスタマイズしています。 Date Image [...]日付のイメージ[...]

Question or Comment??質問やコメントですか?ですか? Spill it Now...今すぐ流出...

ジャンプして喜ぶ以上のコメントを!

We Reward Comments!私たちの報酬のコメントを!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin!私たちdofollowリンク、および取得して最新のブログの投稿ごとに新しいコメントとして署名されてからの" commentluv "差込式! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL!トップへの毎月のcommentersは、すべてのページに上場して、サイドバーのウィジェットは、次のサイトでリンクしてURLを省略して! We would like to reward you for becoming part of our community!私たちの希望になる部分に報奨金を弊社のコミュニティ! Your comment is valuable not only to us, but also all the other readers of this blog!あなたのコメントは貴重な情報だけでなく、他のすべてのだけでなく、このブログの読者の!


Click to add smilies to your post! 顔をしてポストをクリックして追加! == [ ]^ = (= ( (= ( |= )研究= | 8= 0= ) 〜= 00= (= ; ;= ) ]= ; ; ;