Wordpress Hack #15: Hacking Wordpress Tags Wordpress Hack # 15: Hacking Wordpress Tags
1,059 views - 1.059 Ansichten -Posted in: Verfasst am:
1,059 views 1.059 Ansichten
Please note: This page was originally written in English. Bitte beachten Sie: Diese Seite wurde ursprünglich in Englisch 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.
Today we’ll learn How to add Tag Support by hacking your Wordpress theme! Heute werden wir lernen, wie man hinzufügen Tag Unterstützung durch Hacking Ihre Wordpress Thema!
This is day #15 of Dies ist Tag # 15 von 30 Wordpress Hacks in 30 Days 30 Wordpress Hacks in 30 Days .
If you’re using Wordpress 2.3x or 2.5 or higher you have the ability to use “tags”. Wenn Sie Wordpress 2.3x oder 2,5 oder höher haben Sie die Fähigkeit zur Nutzung der "Tags". If you use social media at all, you should already know what a tag is. Wenn Sie mit sozialen Medien überhaupt, sollten Sie bereits wissen, was für ein Tag ist. Basically it’s just a piece of metadata, a “descriptor” of some kind. Im Grunde ist es nur ein Stück von Metadaten, ein "Schlagwort" von irgendeiner Art. When you blog, it’s also another way to pigeonhole and file your content. Wenn Sie in Ihrem Blog, es ist auch eine andere Art und Weise zu einordnen und Ihren Content-Datei. The implementation of tags in Wordpress is very important, because it keep people from “using categories as tags” as many of us have done over the years. Die Umsetzung der Tags in Wordpress ist sehr wichtig, weil es immer Menschen aus "Verwendung von Kategorien wie Tags", wie viele von uns haben im Laufe der Jahre. There were dozens of plugins available to add tags to your Wordpress blog, but now all that functionality is available without using any plugins at all. Es gab Dutzende von Plugins zur Verfügung, um Tags zu Ihrem Wordpress-Blog, aber jetzt allen, die Funktionalität zur Verfügung steht ohne Plugins überhaupt.
Think of categories as high level descriptions. Denken Sie an Kategorien wie hohes Beschreibungen. What do you like to blog about? Was gefällt Dir an Blog zum Thema? Movies, Music, Politics, and Web Design. Filme, Musik, Politik und Web-Design. Those are categories. Dabei handelt es sich um Kategorien. However, when you blog - the tags would be Obama, John Candy, AC/DC, and HTML. Aber, wenn Sie in Ihrem Blog - die Tags wäre Obama, John Candy, AC / DC, und HTML. Get it? Get it? All you have to do is enter description tags when you blog, along with a category. Alles was Sie tun müssen, ist ereichbar Tags, wenn Sie in Ihrem Blog, zusammen mit einer Kategorie. Now you’re probably wondering, what do I do with that information? Jetzt sind Sie wahrscheinlich fragen, was mache ich mit, dass die Informationen?
Depending on how old your theme is it may or may not have “tag support”, which means that it might not be coded to do anything at all with those tags you’re entering. Je nachdem, wie alt Ihr Thema ist es können oder nicht haben "-Tag Unterstützung", was bedeutet, dass es möglicherweise nicht kodiert zu tun überhaupt mit diesen Tags Sie die Eingabe. The first thing you can do is to add a (now famous) “tag cloud” in your side bar like I did, with this code: Das erste, was Sie tun können, ist, eine (inzwischen berühmten) "Tag-Wolke" auf Ihrer Seite bar, wie ich tat, mit diesem Code:
<?php if ( function_exists('wp_tag_cloud') ) : ?> <li> <h2>Popular Tags</h2> <ul> <?php wp_tag_cloud('smallest=8&largest=22'); ?> </ul> </li> <?php endif; ?> <? php if (function_exists ( 'wp_tag_cloud')):?> <li> <h2> Popular Tags </ h2> <ul> <? php wp_tag_cloud ( 'kleinste = 8 & größte = 22');?> </ ul> </ li> <? php endif;?> If you want to know more about how that codes works and how you can modify it, visit the Wenn Sie mehr wissen wollen über die Verwendung dieser Codes funktioniert und wie Sie sie ändern können, finden Sie auf der Wordpress Codex Tag Cloud Page Wordpress Codex Tag Cloud Seite .
Another thing you can do is to add the tags you used beneath your post by adding some code to your single.php file (for single posts). Eine andere Sache, die Sie tun können, ist das Hinzufügen der Tags Sie unter Ihrem Post durch Hinzufügen einiger Code in Ihre single.php-Datei (für Einzel-Stellen). You could do it on your index.php home page as well, but I don’t much see the point in that. Man könnte es tun index.php in Ihre Homepage als gut, aber ich nicht viel sehen, die in diesem Punkt. All you have to do is add the following code near the end of the loop to display the tags used at the end of the post: Alles was Sie tun müssen ist, fügen Sie den folgenden Code am Ende der Schleife, um die verwendeten Tags am Ende des post:
<?php the_tags('<p>Tags: ', ', ', '</p>'); ?> <? php the_tags ( '<p> Tags:', ',', '</ p>');?> So, now we’ve talked about how to modify your theme to add the tags used after a post, and how to place a tag cloud in your sidebar (without using a plugin). So, jetzt haben wir darüber gesprochen, wie Sie Ihr Thema ändern, um die verwendeten Tags nach einer Post, und wie man einen Tag Cloud in Ihrer Sidebar (ohne Verwendung eines Plugins). Click on one of the links in my post (to a tag) or my tag cloud and you’ll see (much like a category page) it goes to a “tag” page, or something like site.com/tag/wordpress-hack. Klicken Sie auf einen der Links in meinem Post (an einem Tag) oder meine Tag Cloud, und Sie werden sehen (so wie eine Kategorie Seite) geht es zu einem "Tag"-Seite, oder so etwas wie site.com/tag/wordpress- hack.
Be default Wordpress will look for the “tag.php” file (that most themes don’t have), and if there isn’t one your archive.php will be used by default. Werden Standard-Wordpress wird nach der "tag.php"-Datei (die meisten Themen nicht haben), und wenn es nicht einen von Ihrem archive.php wird standardmäßig aktiviert. You could just leave this as-is, or create your own custom “tag.php” to make your tag pages unique. Man könnte dieses nur verlassen, wie sie ist, oder erstellen Sie eigene "tag.php", um Ihren Tag Seiten einzigartig. One way to do this would be to add a “tag cloud” to the top of each tag page. Eine Möglichkeit, dies zu tun wäre, um einen "Tag Cloud" an den Anfang eines jeden Tag vorhanden. The Der Wordpress Codex Tag Page Wordpress Codex-tag Seite has more information on creating a custom tag.php file for your theme. verfügt über mehr Informationen zum Erstellen einer benutzerdefinierten tag.php Datei für Ihr Thema.
This post was all about “how to add tag support to your Wordpress theme”. Diese Nachricht wurde alles über "how to add-Tag Unterstützung zu Ihrem Thema Wordpress". In a future post, I’ll show you what you need to know about tagged pages and Wordpress SEO. In einer Zukunft nach, ich zeige dir, was Sie wissen müssen über tagged Seiten und Wordpress SEO. As always, if you have something to add to make this post better, or a question - comment now! Wie immer, wenn du etwas hinzuzufügen, um dieses Amt besser, oder eine Frage - Kommentar jetzt!
Tags: codex Codex , support unterstützen , tag.php , tags Tags , theme Thema , wordpress-hack WordPress-Hack
























May 15th, 2008 at 3:44 pm 15. Mai 2008 um 3:44 pm
You have a really good tutorial there quick and easy to follow, you should amke it into an article and do some article submissions with it to attract more people to your site. Sie haben ein wirklich gutes Tutorial gibt schnell und einfach zu folgen, sollten Sie ihn in einem Artikel und haben einige Artikel Einreichungen mit ihr, um mehr Menschen auf Ihre Website.
Really like that and keep up the good work :) Wirklich gern, und halten die gute Arbeit:)
unique articless last blog post.. einzigartige articless letzten Blog-Eintrag .. The Art Of Online Writing Die Kunst der Online-Writing
May 18th, 2008 at 1:31 pm 18. Mai 2008 um 1:31 pm
LOL I was just looking for this yesterday! LOL Ich war nur nach einer solchen gestern! Thanks for the little tidbit! Thanks for the little tidbit!
Erikas last blog post..1 Erikas letzten Blog-Eintrag .. 1
June 2nd, 2008 at 1:43 pm 2. Juni 2008 auf 1.43 Uhr
Categories are nice to start your site off. Kategorien sind nett zu Beginn Ihrer Website aus. Use the descriptions of the categories to add keyword content like JT talks about and then the tags to get specific. Verwenden Sie die Beschreibungen der Kategorien, um Keyword-Inhalte wie JT Gespräche und dann über die Tags zu bekommen spezifisch. I don’t add tags till I have some pages going. Ich weiss nicht Tags hinzufügen, bis ich habe einige Seiten noch nicht abgeschlossen. . . looks bad to have one post in ten places. sieht schlecht zu haben, eine Stelle in zehn Plätze.
I haven’t found a problem with duplicate content using tags. Ich habe nicht festgestellt, ein Problem mit doppelten Inhalte mit Tags. I know it’sa big topic but google seems to be ok with tags. Ich weiß, es ist ein großes Thema, aber google scheint in Ordnung zu sein mit Tags. I’ve been adding tons on my wordpress.com blog and haven’t seen any problems. Ich habe schon länger auf meinem Tonnen wordpress.com Blog und bisher keine Probleme. However, I do like to keep them to a smaller number on my main blogs but I’ve seen others that use them by the truck loads. Aber ich möchte sie auf eine kleinere Zahl auf meinem Haupt-Blogs, aber ich habe gesehen, dass andere Verwendung der ihnen von der LKW-Ladungen.
CJs last blog post.. CJS letzten Blog-Eintrag .. Sorbs Sorben
June 5th, 2008 at 11:40 am 5. Juni 2008 in 11:40
Update:
Just spent the past few days studying up on tags, technorati, and other blog search engines. Just verbrachte die letzten Tage das Studium auf-Tags, Technorati, Blogs und andere Suchmaschinen.
First, we all should be using the rel-”tag” (note that - should be an Erstens, wir alle sollten mit der rel-"tag" (beachten Sie, dass - sollte ein
sign) on all our links that have key words. Zeichen) für alle unsere Links, die Schlüsselworte. Many of those links you may not want to have a tag for your visitors to follow. Viele dieser Verbindungen können Sie nicht möchten, dass ein Tag für Ihre Besucher zu folgen. This works well with blog search engines, also. Dies funktioniert auch mit Blog-Suchmaschinen, auch. This allows your keywords to be tagged without needing to put a tag at the bottom of your post Auf diese Weise können Ihre Suchbegriffe markiert werden, ohne dass ein Tag am unteren Rand Ihrer Post
Remember that technorati uses + while wordpress uses - between words. Denken Sie daran, dass technorati benutzt + während wordpress verwendet - zwischen den Wörtern. Technorati also uses the - for tags but they aren’t the primary tags, thus a multi word tag on technorati should be worda+wordb+wordc while that will be worda-wordb-wordc on wordpress. Technorati benutzt auch die - für Tags, aber sie sind nicht das primäre Tags, also ein Wort Multi-Tag auf Technorati sollte worda + + wordb während wordc werden worda-wordb-wordc auf WordPress.
Here’s the problem. Hier ist das Problem.
You cannot link within a post to your technorati tag (worda+wordb+wordc) because wordpress will remove the + and you get wordawordbwordc Sie können nicht innerhalb einer Link zu Ihrem Post technorati Tag (worda + wordb + wordc), weil wordpress wird das "+" und Sie erhalten wordawordbwordc
Not what you really want. Nicht das, was Sie wirklich wollen.
Let me see if I can make this clearer. Lassen Sie mich, wenn ich sehen kann, diese klarer.
You may want to hyperlink keywords within the post but not leave your site and have no real post to link to, thus you would love to link to that tag, right? Vielleicht möchten Sie Stichworte, Hyperlink innerhalb der Post, aber nicht Ihre Website verlassen und haben keine echte Post einen Link zu, damit Sie würden gerne einen Link zu diesem Tag, nicht wahr? Well, to have that tag be equal to technorati you want to us a “+” between words, but you can’t do that in a wordpress link. Nun, zu diesem Tag ist gleich technorati Sie möchten uns ein "+" zwischen den Wörtern, aber man kann das nicht, dass in einer wordpress Link. Wordpress will remove the +. Wordpress wird das "+".
The only way to link keywords to a tag page in wordpress is to seperate words with a - Der einzige Weg, um Stichworte zu einer Tag-Seite in WordPress ist zu trennen Wörter mit einer --
That’s the same way wordpress sees your tags, categories, and everything else. Das ist die gleiche Art und Weise wordpress sieht Ihre Tags, Kategorien, und alles andere. WordPress always uses - while technorati used a + WordPress immer verwendet - während technorati verwendet a +
The only real way to stay on your site and use the + is to link the keywords to a search function (hyperlink like normal but end with index.php?s=wordsa+wordb” rel-”tag”) This will then cause a search function on your site for that tagged words in the hyperlink Die einzige echte Möglichkeit, den Aufenthalt auf Ihrer Website und die Verwendung der + ist es, Verbindungen zwischen Stichworte, um eine Suche-Funktion (Hyperlink wie normal, aber endet mit index.php? N = wordsa + wordb "rel-" Tag ") Dies wird dann dazu führen, dass ein Suche-Funktion auf Ihrer Website für das markierte Wörter in der Hyperlink
This is a long way to say, on wordpress you will never have a tag “page” that is equal to a tchnorati tag because wordpress doesn’t allow the use of + as a separator between words. Dies ist ein langer Weg zu sagen, auf WordPress werden Sie nie einen Tag "Seite", ist gleich ein tchnorati Tag, weil wordpress nicht erlaubt die Verwendung von + als Trennzeichen zwischen Wörtern.
CJs last blog post.. CJS letzten Blog-Eintrag .. Akismet Spam Akismet Spam
June 6th, 2008 at 6:44 am 6. Juni 2008 in 6:44
Nicely done. Nicely done. Most of my blog ‘marketing’ is done through social bookmarking. Die meisten meiner Blog 'Marketing' ist durch Social Bookmarking. (I use socialmarker.com to broadcast to multiple bookmarking sites at once.) I really like your ideas here. (Ich benutze socialmarker.com auf Sendung, auf mehrere Standorte Lesezeichen auf einmal.) Ich mag Ihre Ideen hier.
Make Online Moneys last blog post.. Online-Gelder letzten Blog-Eintrag .. Profit from Poo Profitieren Sie von Poo
June 7th, 2008 at 3:12 pm 7. Juni 2008 um 3:12 pm
I’ll consider adding something like the tag cloud, but I really don’t like the look of it. Ich werde in Erwägung ziehen, weitere so etwas wie der Tag Cloud, aber ich wirklich nicht, wie das Aussehen. I’d prefer it to show the more popular tags increasingly darker and darker, but the same font. Ich würde es vorziehen, zu zeigen, desto beliebter Tags zunehmend dunkler und dunkler, aber die gleiche Schrift. Any chance you’ve seen one like this I could use? Jede Chance, den du gesehen hast, eins davon konnte ich verwenden?
Trying Hards last blog post.. Kinderwunsch Hards letzten Blog-Eintrag .. Preparing Safety Posts Vorbereiten Sicherheit Beiträge
June 9th, 2008 at 5:09 am 9. Juni 2008 in 5:09
Trying Hard - try installing the “Simple Tags” plugin, it lets you customise the appearance of tag clouds and do all sorts of other clever things with tags. Trying Hard - installieren Sie die "einfachen Tags" Plugin, so können Sie das Aussehen individuell für Tag Wolken und machen allerlei andere Dinge mit clever-Tags.
June 10th, 2008 at 12:40 pm 10. Juni 2008 in 12:40
I’ll check that out. Ich werde das überprüfen. Thanks. Danke.
Trying Hards last blog post.. Kinderwunsch Hards letzten Blog-Eintrag .. Multiple Ideas Mashed Into One Topic Mehrere Ideen zerdrückte in ein Thema
June 11th, 2008 at 11:05 am 11. Juni 2008 in 11:05
I am yet to see the benefit of using tag cloud. Ich bin noch zu sehen Der Vorteil der Verwendung von Tag Cloud. Maybe I’m wrong but for now I don’t like to clutter my sidebar with it. Vielleicht bin ich für falsch, aber jetzt bin ich nicht gern Unordnung meiner Sidebar mit ihm.
Blog for Beginnerss last blog post.. Blog für Beginnerss letzten Blog-Eintrag .. Yet Another 8 CSS Tips For Your Blog Yet Another 8 CSS-Tipps für Ihr Blog
September 17th, 2008 at 10:14 pm 17. September 2008 um 10:14 Uhr
Any reason why my web site would not be creating the tags on posts? Irgendeinem Grund, warum meine Web-Site wäre nicht die Schaffung von Stellen in Tags?
I added this as you suggested (it’s taken out now): Ich habe dies als Sie schlug vor (es ist jetzt aus):
<?php the_tags(’Tags: ‘, ‘, ‘, ”); ?> <? php the_tags ( 'Tags:', ',', ");?>
I also tried adding the technorati tags plugin that’s still in there. Ich habe auch versucht die Zugabe Technorati Tags Plugin das ist immer noch darin befindet. If you look at the source you will see this: Wenn man an der Quelle sehen Sie hierzu folgendermaßen vor:
So for some reason the template isn’t allowing the tags to go thru. Also aus irgendeinem Grund die Vorlage ist nicht erlaubt die Tags zu durchlaufen. If I use another template the tags show up… Wenn ich mit einer anderen Vorlage die Tags angezeigt…
Craig Mullinss last blog post.. Craig Mullinss letzten Blog-Eintrag .. First Things First in Choosing Your Next Home First things first bei der Auswahl Ihrer nächsten Home
September 18th, 2008 at 12:03 pm 18. September 2008 in 12:03
@Craig Mullins - If you use another theme and the tags show up then your theme is mis-coded. @ Craig Mullins - Wenn Sie ein anderes Thema und den Tags angezeigt, dann ist dein Thema ist falsch kodiert. Search the Wordpress forum for the answer, it probably doesn’t have the normal Wordpress necessary calls - like the one in the footer most likely. Suchen Sie in der Wordpress Forum für die Antwort, es wahrscheinlich nicht über die normale Wordpress notwendigen Gespräche - wie der in der Fußzeile am wahrscheinlichsten.