Free Checking for Bloggers - Sign up in 5 Minutes! Free Checking for Bloggers - Melden Sie sich in 5 Minuten!
Powered by MaxBlogPress Powered by MaxBlogPress

Sehr einfach Wordpress Thema Hack: Schau Kategorie Bilder | JTPRATT sein Blog Fehler
JTPratt sein Blog Fehler


Home Heim » Very Easy Wordpress Theme Hack: Show Category Images »Sehr einfach Wordpress Thema Hack: Schau Kategorie Bilder



Posted in: Verfasst am:

Blog-setup Kategorie BildBlogging-Fehler Kategorie BildWordPress Kategorie Bild
4,852 views 4.852 Ansichten


Please note: This page was originally written in English. Bitte beachten Sie: Diese Seite wurde ursprünglich in englischer Sprache geschrieben.

The original post can be viewed Der ursprüngliche Post angezeigt werden können here hier .

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. Ich werde Ihnen zeigen, wie Sie einige einfache PHP-Code auf Ihrer Wordpress-Template und verknüpft die Bilder erscheinen anstelle von Text für Ihre Kategorien in Planstellen. All you need to know is simple PHP, some basic HTML, and how to make your own graphics. Alles was Sie wissen müssen, ist einfach PHP, einige grundlegende HTML, und wie man seine eigene Grafiken.

**UPDATE** May 2008 ** UPDATE ** Mai 2008
As the last comment at the end of this page shows there is now a Da die letzte Bemerkung am Ende dieser Seite zeigt, gibt es jetzt eine Category Icons Wordpress Plugin Kategorie Symbole wordpress plugin you can download to install to manage your category icons right in your dashboard. Sie können die Installation zu verwalten Ihre Kategorie die Symbole direkt in das Dashboard. If you prefer to hack your theme, the code below will work just fine! Wenn Sie lieber Ihr Thema Hack, den Code unten funktioniert gut! 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! Das kühle, was über das Plugin ist, dass sie Ihnen Wege, um eine oder mehrere Kategorie-Icons, sondern auch ein Verfahren für das Inverkehrbringen die Symbole mit Ihren Klassen in der Side-Bar, wie gut! I’m always very grateful when a good plugin come along! Ich bin immer sehr dankbar, wenn eine gute Plugin-Komm mit! Now back to the original post… Nun zurück zu den ursprünglichen Post…

Have you ever wanted to hack Wordpress and just make it do something you always wanted it to do? Haben Sie jemals wollte Hack Wordpress und nur sie tun etwas, das Sie immer wollten es zu tun? 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. Ich denke an Dinge, die ich wollen, dass er alles tun, die Zeit aber nicht immer über die Stunden zu widmen und finden Sie die Antwort. 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. Ich habe gesucht für PHP-Code-Schnipsel für Wordpress und Tutorials und How-to articles so gut und haben nicht viel gesehen, dass mir wirklich geholfen. Until today - when I read Bis heute - wenn ich lese the tutorial page at WPDesigner today das Tutorial Seite in WPDesigner heute . I didn’t get exactly the code I needed, but pretty close. Ich habe nicht genau den Code ich brauchte, aber ziemlich nahe. I just needed to hack it a bit to get it to do what I wanted. Ich brauchte nur zu hacken sie ein wenig, um es zu tun, was ich wollte.

First, this Wordpress tutorial hack assumes a few things. Erstens, dieser Hack Wordpress Tutorial wird davon ausgegangen, ein paar Dinge.

  1. You’ve modified your Wordpress template code before Sie haben Ihre veränderte Wordpress-Template-Code vor
  2. You can modify simple PHP Sie können einfache PHP
  3. You can write simple HTML Sie können schreiben, einfache HTML -
  4. You can make your own graphics Sie können Ihre eigenen Grafiken

First things first - here’s the code: First things first - hier ist der 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> Verfasst am: </ b> </ h3> <? php foreach ((get_the_category ()) as $ cat) ($ catname = $ cat-> Category_nicename; echo "<a href \" / Kategorie / "; Echo $ catname; echo" / \ ">"; echo "<img src \" / wp-content/cat-icons / "; echo $ catname; echo". Png \ "alt = \" $ catname Kategorie Bild \ "border = \" 0 \ "/> </ a> \ n";)?> <br /> 

I hacked this code from this tutorial page on WPdesigner I hacked diesem Code aus diesem Tutorial-Seite auf WPdesigner . The code they had was only good to display one category per post. Der Code hatte, war sie nur gut, um eine Kategorie per Post. I hacked it because my blogs all have posts assigned to multiple categories. Ich gehackt, weil meine Blogs haben alle Planstellen zugewiesen zu mehreren Kategorien. Also, I wanted the images to all be linked so people can just click them and go right to that category page. Auch wollte ich die Bilder für alle verknüpft werden können, so dass die Leute klicken Sie einfach auf sie und gehen Sie nach rechts auf dieser Kategorie vorhanden. Let’s look at the pieces of this code you might need to modify. Werfen wir einen Blick auf die Teile dieses Codes müssen Sie womöglich ändern.

In line 1, you might want change “Posted in:” to alternate text like “Filed under:”, etc. In Zeile 1, möchten Sie vielleicht ändern "Beitrag in:" auf alternative Text wie "Gespeichert unter:" usw.

In line 5, if your permalink structure is different than the default, you may need to change /category/ to what you are using. In Zeile 5, wenn Ihr permalink Struktur ist anders als der Standardwert, müssen Sie unter Umständen ändern / Kategorie / zu dem, was Sie verwenden.

In line 8 change /wp-content/cat-icons/ to wherever you will be storing your category icons in your site. In Zeile 8 ändern / wp-content/cat-icons / bis wo werden Sie Speichern Ihrer Kategorie Symbole in Ihre Website.

In line 10, if you are using gif’s or jpg’s change .png to your graphic file format. In Zeile 10, wenn Sie mit gif-oder jpg's ändern. Png zu Ihrer Grafik-Datei-Format.

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. Jetzt alles, was Sie zu tun haben, ist schaffen ein Bild für jede Kategorie haben Sie eine legen Sie sie in dem Ordner, den Sie gerade erstellt haben auf dem Server. 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. Stellen Sie sicher, dass die Grafik ist bei Nennung genau so, wie Ihre Kategorien, und wenn Ihre Kategorien haben mehrere Worte fügen Sie einfach einen Bindestrich zwischen jedem Wort. That’s it! 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. Alles, was Sie zu entscheiden haben, ist jetzt, wo Sie wollen, dass diese Kategorie-Icons angezeigt werden, vor oder nach Ihrem Post - und fügen Sie sie in die entsprechende Stelle. 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. Ich habe mir nur nach dem Titel des Posts auf meinem einzigen Post-Seiten - wie Sie sehen können, an der Spitze der Post auf diese Seite verwiesen wurde. You can hack this category icon code a hundred other ways to do what you want. Sie können Hack dieser Kategorie Symbol-Code hundert andere Art und Weise zu tun was Sie wollen. I think in the future I’m going to use it to replace the text category links in my sidebar. Ich denke, in Zukunft werde ich sie ersetzen den Text Kategorie Links in meiner 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). Der einzige Vorbehalt, dass diese (und den Code Hack oben) wäre die Tatsache, dass, wenn Sie nicht über ein Bild einen Text-Link wird angezeigt (in FF, gebrochen oder Bild im IE). So - if you create new categories in the future, make sure you create a new image for each. Also - wenn Sie neue Kategorien in die Zukunft, stellen Sie sicher, dass Sie ein neues Bild für jeden.

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. Meine Blogging Fehle für diesen Post ist, dass ich nicht zu entscheiden, anpassen und hacken meine Wordpress Thema, bevor jetzt auf mein eigenes Layout. Do you have a question or a new way to hack up this wordpress category icon PHP code? Haben Sie eine Frage oder einen neuen Weg zu hacken diese Kategorie wordpress Symbol PHP-Code? Comments and post it now! Kommentare und schicken Sie es jetzt!


17 Responses to “Very Easy Wordpress Theme Hack: Show Category Images” 17 Responses to "Very Easy Wordpress Thema Hack: Schau Kategorie Images"

  1. The Smorgasbord Die Smorgasbord Has the following to say... Hat die folgenden zu sagen ...

    This was very easy to do - thanks for the code and the tip! Dies war sehr leicht zu machen - Danke für den Code und die Spitze!

    The Smorgasbord’s last blog post.. Die letzten Smorgasbord's Blog-Post .. Convert Vinyl Records to MP3 Wandeln Sie Vinyl-Schallplatten zu MP3

  2. 50 tips y trucos para optimizar Blogger y WP | Blog en Serio 50 Tipps Trucos y para optimizar Blogger y WP | Blog de Serio Has the following to say... Hat die folgenden zu sagen ...

    [...] Imágenes para las categorías [...] [...] Imágenes para las Kategorien [...]

  3. Blogbuster: блоги, blogs, blogging, RSS, Wordpress, социальное Blogbuster: блоги, Blogs, Blogging, RSS, Wordpress, социальное Has the following to say... Hat die folgenden zu sagen ...

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

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

  4. 25 hacks para dinamizar seu Wordpress! 25 Hacks para seu dinamizar Wordpress! — Bytes a Go-go! -- Bytes, die ein Go-Go! Has the following to say... Hat die folgenden zu sagen ...

    [...] Imagens para categorias. [...] Imagens para categorias. Adiciona imagens para cada categoria do seu blog e são mostradas no post se você preferir. Adiciona Imagens para cada categoria do seu Blog e são mostradas keine Post Wenn Sie preferir. [...]

  5. Blog Verde » 25 Hacks pra dinamizar o Wordpress Blog Verde »25 Hacks pra dinamizar o Wordpress Has the following to say... Hat die folgenden zu sagen ...

    [...] Imagens para categorias. [...] Imagens para categorias. Adiciona imagens para cada categoria do seu blog e são mostradas no post se você preferir. Adiciona Imagens para cada categoria do seu Blog e são mostradas keine Post Wenn Sie preferir. [...]

  6. 63 Essential Wordpress Hacks, Tutorials, Help Files and Cheats | Speckyboy - Wordpress and Design 63 Essential Wordpress Hacks, Tutorials, Hilfedateien und Cheats | Speckyboy - Wordpress und Design Has the following to say... Hat die folgenden zu sagen ...

    [...] Show Category Images (Source: [...] [...] Anzeigen Kategorie Bilder (Quelle: [...]

  7. 63 essenziali Wordpress Hacks, Tutorials, Help Files e Cheats : technorati.it 63 essenziali Wordpress Hacks, Tutorials, Hilfedateien e Cheats: technorati.it Has the following to say... Hat die folgenden zu sagen ...

    [...] Show Category Images (Source: [...] [...] Anzeigen Kategorie Bilder (Quelle: [...]

  8. Wordpress Tutorials/Hacks « The house of software freeware Wordpress Tutorials / Hacks «Das Haus von Software-Freeware Has the following to say... Hat die folgenden zu sagen ...

    [...] Show Category Images (Source: [...] [...] Anzeigen Kategorie Bilder (Quelle: [...]

  9. Mastering Your WordPress Theme Hacks and Techniques Mastering Ihrer WordPress Theme Hacks und Techniken Has the following to say... Hat die folgenden zu sagen ...

    [...] 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) Karte Kategorie Bilder-Wie fügt man ein paar einfache PHP-Code auf Ihrer WordPress-Template und verknüpft die Bilder erscheinen anstelle von Text für Ihre Kategorien in Planstellen. [...]

  10. letrodectus letrodectus Has the following to say... Hat die folgenden zu sagen ...

    Great hack! Great Hack! thanks Danke =

  11. 63 Essential Wordpress Hacks, Tutorials, Help Files and Cheats | Speckyboy - Wordpress and Design » 쟈스민(JASMIN) 63 Essential Wordpress Hacks, Tutorials, Hilfedateien und Cheats | Speckyboy - Wordpress und Design »쟈스민 (Jasmin) Has the following to say... Hat die folgenden zu sagen ...

    [...] Show Category Images (Source: [...] [...] Anzeigen Kategorie Bilder (Quelle: [...]

  12. paidnetpedia.com paidnetpedia.com Has the following to say... Hat die folgenden zu sagen ...

    [...] sticky”- When we need to have certain articles ’stay at the top’ longer than others. [...] Klebrig "- Wann brauchen wir bestimmte Artikel" Aufenthalt an der Spitze "mehr als andere. 10)Show Category Images- How to add some simple PHP code to your WordPress template and make linked images appear instead [...] 10) Karte Kategorie Bilder-Wie fügt man ein paar einfache PHP-Code auf Ihrer WordPress-Template und verknüpft die Bilder erscheinen statt [...]

  13. Submarine U-Boot Has the following to say... Hat die folgenden zu sagen ...

    Hi

    here is a plugin that do the job : hier ist ein Plugin, dass Sie den Job:

    Category Icons Plugin Kategorie Symbole Plugin .

  14. Remkus Remkus Has the following to say... Hat die folgenden zu sagen ...

    That is a very nice Hack! Das ist ein sehr netter Hack! I realize there is a plugin now, but I think I am going to just edit this in one of my projects. Ich weiss, dass es ein Plugin ist jetzt, aber ich denke, ich werde einfach ändern dies in einem meiner Projekte. Thanks for writing it down! Vielen Dank für das Schreiben it down!

  15. What is Category Icons ? Was ist Kategorie Icons? « Category Icons «Kategorie-Icons Has the following to say... Hat die folgenden zu sagen ...

    [...] : JTPRATT’s Blogging Mistakes ( here & here ), Performancing Helping Bloggers [...] [...]: JTPRATT's Blogging Fehler (hier und hier), Performancing Helping Bloggers [...]

  16. 155 Wordpress Resources, Tutorials, Plugins, Themes, AJAX, Podcasting…WP Monster List | Speckyboy - Wordpress and Design 155 Wordpress Resources, Tutorials, Plugins, Themes, AJAX, Podcasting… WP Monster List | Speckyboy - Wordpress und Design Has the following to say... Hat die folgenden zu sagen ...

    [...] 84. [...] 84. No More CSS Hacks. No more CSS-Hacks. 85. Create a Dynamic Sticky. Schaffung eines dynamischen klebrig. 86. Styling Individual Posts Using the_ID. Styling einzelne Posts Mit the_ID. 87. Show Category Images. Kategorie Bilder anzeigen. 88. Separate WordPress Comments and Trackbacks. Separate WordPress Kommentare und Trackbacks. 89. Customize your WordPress Login. Passen Sie Ihre Login WordPress. 90. Date Image [...] Datum Bild [...]

  17. 155个 WordPress 资源、指导、插件、主题、AJAX、播客…… —— WP 详细清单(译) | 晴天里的一道�… 155个WordPress资源,指导,插件,主题, AJAX,播客…… - WP详细清单(译) |晴天里的一道… Has the following to say... Hat die folgenden zu sagen ...

    [...] 84. [...] 84. No More CSS Hacks 85. No More 85 CSS-Hacks. Create a Dynamic Sticky 86. Schaffung eines dynamischen Sticky 86. Styling Individual Posts Using the_ID 87. Styling einzelne Posts Mit the_ID 87. Show Category Images 88. Kategorie anzeigen 88 Bilder. Separate WordPress Comments and Trackbacks 89. Separate WordPress Kommentare und Trackbacks 89. Customize your WordPress Login 90. Passen Sie Ihre Login WordPress 90. Date Image [...] Datum Bild [...]

Question or Comment?? Fragen oder Kommentare? Spill it Now... Spill it Now ...

Jumping für die Freude über diese Kommentare durch!

We Reward Comments! Wir belohnen Kommentare!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin! Wir dofollow Links, und Sie erhalten alle neuesten Blog-Post als Verfasserzeile unter jedem neuen Kommentar aus der "CommentLuv" Plugin! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL! Top commenters für jeden Monat sind auf jeder Seite dieser Website in einer Sidebar Widget Zusammenhang zurück zu Ihrer URL! We would like to reward you for becoming part of our community! Wir möchten Sie zur Belohnung für immer Teil unserer Community! Your comment is valuable not only to us, but also all the other readers of this blog! Ihr Kommentar ist wertvoll, nicht nur für uns, sondern auch alle anderen Leser dieses Blogs!


Click to add smilies to your post! Klicken Sie auf Add Smilies auf Ihre Post! == []^ = (= ((= (|=) r= | 8= 0=) ~= 00= (=;;=)]=;;;