<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Texto.de - Mein WordPress Magazin &#187; template-tag</title>
	<atom:link href="http://www.texto.de/tag/template-tag/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.texto.de</link>
	<description>Tutorials zu  WordPress als Blog, WordPress als CMS, WP SEO tauglich machen - einfach ein WP Nachschlagewerk</description>
	<lastBuildDate>Tue, 31 Jan 2012 22:41:38 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Thumbs- Bilder anzeigen, obwohl the_excerpt verwendet wird</title>
		<link>http://www.texto.de/thumbs-bilder-anzeigen-obwohl-the_excerpt-verwendet-wird-1260/</link>
		<comments>http://www.texto.de/thumbs-bilder-anzeigen-obwohl-the_excerpt-verwendet-wird-1260/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 13:03:08 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[template-tag]]></category>
		<category><![CDATA[Youtube-PodCast-Bilder]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=1260</guid>
		<description><![CDATA[Wie zeigt man Thumbs /Bilder an, wenn man the_excerpt in einem WordPress Theme Template nutzt. Mithilfe der Artikelbilder, einer eigens geschriebenen Funktion und bei beiden zeige ich auf, was man anzeigen kann, wenn es mal gar kein Bild gibt. ]]></description>
			<content:encoded><![CDATA[<dl class="left" style="width:160px;">
<dt> Show Thumbs&nbsp;</dt>
<dd><img src="http://www.texto.de/wp-images/0911/show-thumbs.gif" alt=" Show Thumbs in WordPress" width="145" height="142" /></dd>
</dl>
<p><span class="caplize">I</span>ch wurde von Ramona  per Email gefragt wie man denn<strong> Thumbs auf der Suchergebnisseite</strong> anzeigt. Also nehm ich an, dass bei diesem WP Theme die Suchergebnisinhalte mit <strong>the_excerpt</strong> angezeigt werden, weil man dort keine Bilder sieht. </p>
<p>Nun das kommt drauf an, verwendet man wirklich bei jedem Artikel ein sogenanntes &#8220;<strong>Artikelbild</strong>&#8221; oder hat man das nicht immer gemacht.  Es gibt ja auch Blogs, da gab es diese Artikelbilder noch gar nicht. Außerdem kann es sein, dass ein Artikel vielleicht gar kein Bild hat. Weder im Artikel noch ein Artikelbild.  Und bei manchmal tausenden von Artikeln mag man wirklich nicht alle kontrollieren. Zumindest kenn ich kaum jemand, der das gern macht <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Daher zeige ich hier in diesem Artikel. Eine Lösung, wenn es lauter Artikelbilder gibt. Eine Lösung, wenn es Bilder gibt, aber keine Artikelbilder und beide Lösungen mit einer FallbackLösung, wenn mal kein Bild da sein sollte. </p>
<p><span id="more-1260"></span></p>
<p>Geschickt ist es, wenn man ein Standardbild default.jpg im Ordner &#8220;images&#8221; des jeweiligen Themes platziert. Dies sollte die Größe der Thumbs haben, das erspart &#8220;Bandbreite&#8221;. </p>
<h3>Thumbs anzeigen mit Artikelbild </h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #666666; font-style: italic;">//das muss in den loop</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>has_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">120</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;class&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;alignright post_thumbnail&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Im Theme TwentyTen Eleven muss man in allen Templates, die mit content anfangen nach dem Platz suchen,<br />
weil die search.php die alle nimmt je nachdem, unter welchem Postformat ein Artikel gespeichert wurde.<br />
Also diesen obigen Code gleich nach&#8230; einfügen.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Only display Excerpts for Search ?&gt;</span></pre></div></div>

<h3>Lösung ohne Artikelbilder catch that image</h3>
<p>Man kann ja auch das erste Bild aus einem Artikel holen und dieses dort anzeigen lassen wo man mag.</p>
<p>Folgender Code gehört in die<strong> functions.php </strong>des verwendeten Themes:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #666666; font-style: italic;">//hole das erste Bild oder ein StandardBild</span>
<span style="color: #000000; font-weight: bold;">function</span> catch_that_image<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">,</span> <span style="color: #000088;">$posts</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$first_img</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ob_end_clean</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&gt;/i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_content</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$first_img</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$matches</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$huch</span><span style="color: #339933;">=</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// no image found display default image instead</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$first_img</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000088;">$first_img</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$huch</span>/images/default.jpg&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">return</span> <span style="color: #000088;">$first_img</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Im Template holt man dieses Bild dann so:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
&lt;img class=&quot;alignleft&quot; src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catch_that_image'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> catch_that_image<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;&quot; width=&quot;150&quot; height=&quot;120&quot; /&gt;</pre></div></div>

<p>Mag man dieses Bild verlinken-zb mit dem Permalink zum Artikel, dann so:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
&lt;a class=&quot;bilderlink&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;   title=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span>   the_title_attribute <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;img class=&quot;alignleft&quot; src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catch_that_image'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> catch_that_image<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;&quot; width=&quot;150&quot; height=&quot;120&quot; /&gt;&lt;/a&gt;</pre></div></div>

<p>Selbstverständlich kannst Du das html und die CSS Klassen nach deinem Belieben ändern. </p>
<div class="sign"> <img src="http://www.texto.de/wp-images/smilies/icon_confused.gif" alt="Kaffeetrinkender Smilie" width="27" height="21" /></div>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/thumbs-bilder-anzeigen-obwohl-the_excerpt-verwendet-wird-1260/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/thumbs-bilder-anzeigen-obwohl-the_excerpt-verwendet-wird-1260/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Letztes Update</title>
		<link>http://www.texto.de/letztes-update-1254/</link>
		<comments>http://www.texto.de/letztes-update-1254/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 18:43:06 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[template-tag]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=1254</guid>
		<description><![CDATA[the_modified_date zeigt verläßtlich an wann ein Artikel das letzte Mal in WordPress gespeichert oder aktualisiert wurde. the_time zeigt an, wann er das erste Mal veröffentlicht wurde. ]]></description>
			<content:encoded><![CDATA[<dl class="left" style="width:185px;">
<dt>Last Modified</dt>
<dd><img  src="http://www.texto.de/wp-images/wordpress-functions.jpg" alt="WordPress-Templates Funktionen" width="170" height="170" /></dd>
</dl>
<p> <span class="caplize">I</span>ch bin aktuell und sicher noch die nächsten Tage immer wieder damit beschäftigt die Artikel hier auf der Texto.de neu zu ordnen: Neue Tags /Schlagworte werden vergeben. Kategorien sicher umbenannt, vielleicht auch gelöscht, vielleicht entstehen auch neue.  </p>
<p>Grund für diese Reorganisation meiner Artikel ist die Tatsache, dass es hier Artikel aus dem Jahr 2006 gibt, die obwohl sie so alt sind immer noch Gültigkeit haben. Andere aber hatten ihre Zeit und es ist zwar nett sie aufzuheben, aber sie haben nur mehr &#8220;Archiv&#8221; Wert. <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </p>
<p><span id="more-1254"></span></p>
<p>Ich mag aber meinen Leserinnen und Lesern Aktuelles liefern. </p>
<p>So nutze ich hier nun auf der Texto.de <strong>the_modified_date</strong>, dies zeigt verläßlich an, wann ein Artikel das letzte Mal gespeichert, aktualisiert wurde. </p>
<h3>Letztes Update</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_modified_date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>zb.: Hier bei dem Artikel siehst Du es gut: <a href="http://www.texto.de/spielerei-mit-dem-more-tag-von-wordpress-599/" title="Spielerei mit dem More Tag">Spielerei mit dem More-Tag</a>. Unter dem Titel steht das Datum des letzten Updates und unterhalb des Artikels das Datum der Erstveröffentlichung. </p>
<dl class="center" style="width:360px;">
<dt> &nbsp;</dt>
<dd><img src="http://www.texto.de/wp-images/0911/last-modified-date.jpg" alt=" the_modified_date template tag" width="350" height="143" /></dd>
</dl>
<p>Und Du siehst auch meinen tollen Tippfehler auf dem Screenshot <img src='http://www.texto.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<h3>Datum der Veröffentlichung</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'d.m.Y'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Ich werde mich sicher melden, wenn ich mit der Reorganisation ganz fertig bin und ich hoff natürlich, dass der Überblick hier dann ein ganz besonders guter wird. </p>
<div class="sign"><img src="http://www.texto.de/wp-images/smilies/icon_confused.gif" alt="Kaffeetrinkender Smilie" width="27" height="21" /> </div>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/letztes-update-1254/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/letztes-update-1254/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>die vielen Möglichkeiten von the_excerpt &#8211; die Artikel Kurzfassung von WordPress</title>
		<link>http://www.texto.de/die-vielen-moeglichkeiten-von-the_excerpt-die-artikel-kurzfassung-von-wordpress-1218/</link>
		<comments>http://www.texto.de/die-vielen-moeglichkeiten-von-the_excerpt-die-artikel-kurzfassung-von-wordpress-1218/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 09:43:59 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[statische Seiten]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[template-tag]]></category>
		<category><![CDATA[wordpress-plugins]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=1218</guid>
		<description><![CDATA[the_excerpt in WordPress selbst schreiben. Erstelle Deine Kurzfassung eines WordPress Artikels und zeige dies mit the_excerpt dann an. Außerdem erkläre ich weitere Nutzungsmöglichkeiten. ]]></description>
			<content:encoded><![CDATA[<dl class="left" style="width:320px;">
<dt> Kurzfassungen verführen&nbsp;</dt>
<dd><img src="http://www.texto.de/wp-images/0811/mts-the-excerpt-individuell.gif" alt=" the_excerpt in WordPress selbst schreiben" width="302" height="220" /></dd>
</dl>
<p><span class="caplize">M</span>öchtest Du auf beim Klick auf die Kategorie oder vor jedem Artikel nur eine Kurzfassung des Artikels präsentieren, dann brauchst Du <strong>the_excerpt</strong>.  Selbstverständlich kann man diesen automatisch erstellen lassen, doch wesentlich besser ist es diesen selbst zu schreiben, weil Du damit eher Deine Leser ansprechen kannst.</p>
<p>Als erster erkläre ich wie man so eine Kurzfassung auch für statische Seiten in WP nutzbar machen kann,<br />
dananch wo man das Schreibfeld dafür findet, wie man ihn richtig schreibt, wo er überall erscheint, biete Code Beispiele und ganz am Schluss einige hilfreiche Links, solltest Du noch mehr aus the_excerpt herausholen wollen. </p>
<h3>the_excerpt für statische Seiten nutzbar machen</h3>
<p><span id="more-1218"></span></p>
<p>Es gibt einige Plugins, die Dir die Funktion des Auszugs (=Kurzfassung) in das Schreibpanel für statische Seiten holen.<br />
Doch dies geht ganz einfach in der <strong>functions.php</strong> des verwendeten Themes.</p>
<p>Öffne diese mit einem Texteditor und tippe dort wo Du es wiederfindest folgendes hinein:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Auszug oder Kurzfassung fuer statische Seiten the excerpt</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_add_excerpts_to_pages'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> my_add_excerpts_to_pages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     add_post_type_support<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'page'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'excerpt'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>the_excerpt selbst schreiben</h3>
<p>Schreibst Du einen Artikel dann kannst Du Dir unter dem Schreibfeld das Schreibfeld für die Kurzfassung anzeigen lassen. Wie das geht erklärte ich hier: <a href="http://www.texto.de/wordpress-menue-optionen-verstecktes-finden-1199/" title="Versteckte Optionen in WP finden.">versteckte Optionen in WP finden</a>. Sowohl bei Artikeln wie bei Seiten musst Du den Auszug spätestens ab WP 3.2.1 selbst aktivieren.</p>
<h3>the_excerpt die Kurzfassung richtig schreiben</h3>
<p>Schreibe maximal 1-2 kurze Sätze, die kurz und knackig den Inhalt des Artikels präsentieren. </p>
<p>Legst Du Wert darauf, dass man Deinen Blog bei den Suchergebnissen von Google anklickt, dann bedenke dies beim Schreiben <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Zu 90% nimmt Google nämlich diese meta description für die Snippets in den Suchergebnissen. </p>
<h3>the_excerpt als meta description nutzen &#8211; Google Snippet</h3>
<p>Viele der hilfreichen SEO Plugins nutzen the_excerpt, um damit die meta description im html-header zu erzeugen. Manche SEO bestehen darauf, dass diese meta description nur eine ganz bestimmte Zeichenlänge haben darf.</p>
<p>Dies ist zwar ein wenig Offtopic, doch ich sag immer:&#8221;achte darauf kurz und knackig zu sein und überleg Dir worauf Du klicken tätst.&#8221; Zeichenzählerei muss nicht wirklich sein. </p>
<p>Nutzt Du kein SEO Plugin- so wie ich &#8211; kannst Du dies selbst machen. </p>
<p>öffne die <strong>header.php</strong> mit einem Texteditor und schreibe dort bei all den anderen meta Angaben folgendes hinein:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">||</span>is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;meta name=&quot;description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span>get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>strip_tags ist eine Vorsichtsmaßnahme, solltest Du doch einmal keine Kurzfassung schreiben und als erster ein Bild präsentieren magst Du sicher nicht, dass man &#8220;caption..&#8221; im Auszug findet. <img src='http://www.texto.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3>Präsentier eine Inhaltsangabe zum Artikel  </h3>
<p>Hier auf der Texto.de siehst Du vor jedem Artikel eine kurze Inhaltsangabe.<br />
Auch dafür nutze ich the_excerpt. </p>
<p>WordPress Themes sind meist sehr eigen, daher ist es schwer hier eine sehr genaue Anleitung zu geben.</p>
<p>Für TwentyTen findest Du dies in der <strong>loop-single.php</strong>, hier am besten unterhalb dessen:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;entry-meta&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> twentyten_posted_on<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;&lt;!-- .entry-meta --&gt;</pre></div></div>

<p>Das sieht dann so aus:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;entry-meta&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> twentyten_posted_on<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;&lt;!-- .entry-meta --&gt;
&lt;div class=&quot;entry-summary&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;</pre></div></div>

<p>In Twenty Eleven wäre dies die <strong>content-single.php</strong> und für statische Seiten die <strong>content-page.php</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post'</span> <span style="color: #339933;">==</span> get_post_type<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;entry-meta&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> twentyeleven_posted_on<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;&lt;!-- .entry-meta --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/header&gt;</pre></div></div>

<p>Entweder noch vor &#8220;endif /header oder gleich darunter.  Du kannst denselben Code nehmen wie für TwentyTen.</p>
<h3>Weitere the_excerpt INFOs und Spielereien findest Du hier:</h3>
<ul>
<li><a href="http://wpengineer.com/1684/wordpress-2-9-new-excerpt-filters/" title="neue Filter für the_excerpt">Neue the_excerpt Filter</a>.
</li>
<li><a href="http://wpengineer.com/1909/manage-multiple-excerpt-lengths/" title="Unterschiedliche Länge von Auszügen">Unterschiedliche Länge von Auszügen nutzen</a>.
</li>
<li>Kurzfassungen des Artikels in den <a href="http://www.wordpress-buch.de/2011/08/wordpress-kurzfassungen-in-suchergebnissen/" title="Kurzfassungen im Blog nutzen">Suchergebnissen Deines Blogs</a> nutzen.
</li>
</ul>
<div class="sign">war es hilfreich freu ich mich übers Weitersagen via Twitter oder G+ oder&#8230; <img src='http://www.texto.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </div>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/die-vielen-moeglichkeiten-von-the_excerpt-die-artikel-kurzfassung-von-wordpress-1218/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/die-vielen-moeglichkeiten-von-the_excerpt-die-artikel-kurzfassung-von-wordpress-1218/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Subpages-die Unterseiten beim Klick auf die Hauptseite anzeigen</title>
		<link>http://www.texto.de/subpages-die-unterseiten-beim-klick-auf-die-hauptseite-anzeigen-446/</link>
		<comments>http://www.texto.de/subpages-die-unterseiten-beim-klick-auf-die-hauptseite-anzeigen-446/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:12:49 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[template-tag]]></category>
		<category><![CDATA[WordPress Quick Tipps]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=446</guid>
		<description><![CDATA[In WordPress die  statischen Unterseiten anzeigen, wenn die Hauptseite angezeigt wird. ]]></description>
			<content:encoded><![CDATA[<dl class="left" style="width:260px;">
<dt>WP CMS komplexe Projekte</dt>
<dd><img  src="http://www.texto.de/wp-images/wordpress-cms-komplexe-projekte.jpg" alt="WP CMS einfache L&ouml;sungen f&uuml;r komplexe Projekte" width="250" height="250" /></dd>
</dl>
<p><span class="caplize">D</span>u magst beim Klick auf die Hauptseite die Unterseiten anzeigen. Entweder für eine horizontale Menüleiste oder einfach in der Sidebar.  </p>
<p>Nutzt Du in der Sidebar keine Widgets, dann einfach den Code dorthin kopieren wo Du die Anzeige haben magst.</p>
<p>Nutzt Du Widgets, dann hol Dir das Plugin Exec-PHP und nutze dann ein Textwidget.</p>
<div class="eyecatch">
<p>Dieser Artikel wurde erneuert, weil WP 2.8 mit dem alten Code nicht so funktioniert!</p>
</div>
<p><span id="more-446"></span></p>
<p><br class="clear" /><br />
<h3>Unterseiten anzeigen für WP 2.8</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;ul&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$id</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$navpages</span> <span style="color: #339933;">=</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title_li=&amp;child_of=<span style="color: #006699; font-weight: bold;">$id</span>&amp;depth=1&amp;echo=0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$navpages</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$navpages</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
     wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title_li=&amp;child_of=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>

<p><br class="clear" /></p>
<dl class="left" style="width:245px;">
<dt>WordPress 2.7</dt>
<dd><img  src="/wp-images/wp27.gif" alt="WordPress 2.7" width="230" height="143" /></dd>
</dl>
<h3>Unterseiten anzeigen  für WP 2.7.1 </h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$parent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$parent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_li=&amp;child_of=$parent&amp;depth='</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Artikelversionen:</h3>
<p>Erstveröffentlichung am: 16.01.2009 @ 09:24<br />
edit am: 24.6.09 WP 2.8 ist anders <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="sign">Viel Freud mit dem Quick Tipp und übers Weitersagen erfreu ich mich &#8230; <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </div>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/subpages-die-unterseiten-beim-klick-auf-die-hauptseite-anzeigen-446/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/subpages-die-unterseiten-beim-klick-auf-die-hauptseite-anzeigen-446/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>WordPress 2.8 von der E-Mail über die Zeitzone bis zum  reparierten Template Tag</title>
		<link>http://www.texto.de/wordpress-28-email-zeitzone-template-tag-852/</link>
		<comments>http://www.texto.de/wordpress-28-email-zeitzone-template-tag-852/#comments</comments>
		<pubDate>Wed, 20 May 2009 08:34:26 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[WP-Admin]]></category>
		<category><![CDATA[template-tag]]></category>
		<category><![CDATA[WP 2.8]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=852</guid>
		<description><![CDATA[Etliches an Neuerungen  und Bugfixes vom WordPress 2.8. E-Mail bei neuen Usern, template Tags repariert und neue gibt es auch. Sommerzeit muss nicht mehr eingestellt werden. ]]></description>
			<content:encoded><![CDATA[<p><dl id="attachment_853" class="wp-caption alignleft" style="width: 310px"><dt><img src="http://www.texto.de/wp-images/2009/05/zeitzone-wp28.gif" alt="Stadt auswählen - Sommerzeit Ade " title="zeitzone-wp28" width="300" height="263" class="size-full wp-image-853" /></dt><dd class="wp-caption-text">Stadt auswählen - Sommerzeit Ade </dd></dl>  <span class="caplize">A</span>b WordPress 2.8 braucht jeder User eine <strong>eigne E-Mail Adresse</strong>. Mich trifft dies, weil ich bis dato für all meine Testuser ja nur eine E-Mail genutzt habe, das geht nicht mehr.  Legt ein Admin selber einen neuen User an kann er nun anhaken, dass dem das Passwort zugesendet wird oder eben nicht. Ebenso wird der<strong> user_nicename </strong> also der Nickname auf die Einmaligkeit überprüft. </p>
<h3>Zeitzone &#8211; Sommerzeit &#8211; Normalzeit</h3>
<p>Ab WordPress 2.8 stellt sich die Sommerzeit und Normalzeit generell selbst ein, weil man die Stadt <span id="more-852"></span>seiner Zeitzone auswählen kann. </p>
<h3>wp_list_categories repariert</h3>
<p>Ab jetzt werden wieder alle Unterkategorien <!--more-->ausgeschlossen, wenn man die dazugehörige Hautpkategorie per exclude von der Anzeige ausschließt.</p>
<h3>comments_open() pings_open()</h3>
<p>WordPress 2.8 bringt 2 neue <a href="http://codex.wordpress.org/Conditional_Tags" title="Codex Conditional Tags">conditional tags</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> pings_open<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post_id</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_open<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post_id</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Damit kann man innerhalb des Loops abfragen, ob die Kommentare /Pings für den jeweiligen Beitrag offen sind. </p>
<h3>log in log out mit Weiterleitung</h3>
<p>Hier kann man nun<a href="http://codex.wordpress.org/Template_Tags/wp_loginout" title="log in log out "> eine URL</a> angeben wo der User *landen* soll:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_loginout<span style="color: #009900;">&#40;</span><span style="color: #000088;">$redirect</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>wp_tag_cloud</h3>
<p>hat nun auch den Parameter *<a href="http://codex.wordpress.org/Template_Tags/wp_tag_cloud" title="template tag wp_tag_cloud">echo</a>*. </p>
<h3>the_author_meta </h3>
<p>Mit diesem neuen <a href="http://codex.wordpress.org/Template_Tags/the_author_meta" title="the_author_meta">Template tag</a> kann man einfacher Daten aus den Userprofilen ausgeben:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_author_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$field</span><span style="color: #339933;">,</span> <span style="color: #000088;">$userID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_author_meta<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'user_email'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">25</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Damit gibt man die E-Mail Adresse des Users mit der ID 25 aus. </p>
<p><strong>get_pages</strong> und <strong>wp_list_pages</strong> gibt es auch Neuerungen, aber die mag ich zuerst gut testen, dann erklär ich sie. </p>
<p>Ich freu mich über Social Bookmarks,wenns für Dich hilfreich war-naja und weitersagen ist wie immer erlaubt, erwünscht &#8212; <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<div class="sign"> <img src="/wp-images/smilies/icon_confused.gif" alt="Kaffeetrinkender Smilie" width="27" height="21" /></div>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/wordpress-28-email-zeitzone-template-tag-852/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/wordpress-28-email-zeitzone-template-tag-852/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.8 Tag Description und</title>
		<link>http://www.texto.de/wordpress-28-tag-description-und-850/</link>
		<comments>http://www.texto.de/wordpress-28-tag-description-und-850/#comments</comments>
		<pubDate>Tue, 19 May 2009 07:16:15 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[WP-News]]></category>
		<category><![CDATA[template-tag]]></category>
		<category><![CDATA[WP 2.8]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=850</guid>
		<description><![CDATA[WordPress 2.8 bringt den template tag tag_description. Damit kann man tags eine Kurzbeschreibung mitgeben .Gut für den User und  gut für die Suchmaschinen. ]]></description>
			<content:encoded><![CDATA[<p><dl id="attachment_851" class="wp-caption alignleft" style="width: 310px"><dt><img src="http://www.texto.de/wp-images/2009/05/tag-description.gif" alt="Tag Beschreibung einfügen" title="tag-description" width="300" height="263" class="size-full wp-image-851" /></dt><dd class="wp-caption-text">Tag Beschreibung einfügen</dd></dl> <span class="caplize">W</span>ordPress 2.8 bietet ab nun die Möglichkeit jedem <strong>Tag eine Kurzbeschreibung </strong>mitzugeben. Bis dato konnte man dies nur bei den <a href="http://www.texto.de/bei-jeder-kategorie-einen-kleinen-text-stehen-wie-geht-das-315/" title="Über jeder Kategorie steht ein kleiner Text wie geht das">Kategorien </a>machen. </p>
<p>Diese kleine Beschreibung bietet die Möglichkeit dem User kurz zu sagen was er denn da jetzt für eine Übersicht sieht, wenn er auf eine Tag Übersichtsseite klickt. </p>
<p>Und diese Beschreibung ist nicht unwichtig für den meta tag description <span id="more-850"></span>zwischen head und /head im <abbr title="Hyper Text Markup Language"><span class="abbr" title="Hyper Text Markup Language">HTML</span></abbr> Header.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> tag_description<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tagID'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>tag_description als meta description verwenden</h3>
<p>Dies gehört zwischen head und /head meist in die header.php.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;meta name=&quot;description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span>tag_description<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;       
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>tag_description als Beschreibungstext beim Aufrufen einer Tag Seite nutzen</h3>
<p>Entweder in die archive.php, category.php oder tag.php. Das HTML hier ist beispielhaft.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
 <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
 &lt;h3&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Archive for'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'mtsjourney'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> single_tag_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt;
 <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span>  <span style="color: #009900;">&#40;</span>tag_description<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Findest Du diese INFOs über WordPress 2.8 hilfreich freu ich mich über einen Bookmark bei Technorati <img src='http://www.texto.de/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' /> </p>
<div class="sign"><img src="/wp-images/smilies/icon_confused.gif" alt="Kaffeetrinkender Smilie" width="27" height="21" /> </div>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/wordpress-28-tag-description-und-850/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/wordpress-28-tag-description-und-850/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>16 best practise Tipps: statische Seiten in WordPress</title>
		<link>http://www.texto.de/16-best-practise-tipps-statische-seiten-in-wordpress-831/</link>
		<comments>http://www.texto.de/16-best-practise-tipps-statische-seiten-in-wordpress-831/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 14:48:27 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[statische Seiten]]></category>
		<category><![CDATA[template-tag]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=831</guid>
		<description><![CDATA[Best practise für statische Seiten bringt eine Sammlung nützlicher Tutorials und Plugins für die Nutzung von statischen Seiten in WordPress. Ergänzungen sind gerne erwünscht. ]]></description>
			<content:encoded><![CDATA[<dl id="attachment_832" class="wp-caption alignleft" style="width: 310px"><dt><a href="http://www.hajosiewer.de/" title="Menüs der besondern Art"><img src="http://www.texto.de/wp-images/2009/04/menue-300x157.gif" alt="Menüs der besonderen Art" title="menue" width="300" height="157" class="size-medium wp-image-832" /></a></dt><dd class="wp-caption-text">Menüs der besonderen Art</dd></dl>
<p><span class="caplize">S</span>tatische Seiten in WordPress sind beliebt, es gibt jede Menge an Tipps und Tricks was man mit ihnen alles anstellen kann. Von der Navigation bishin zu WordPress nur mit statischen Seiten nutzen.  In diesem Artikel mag ich die mir bekannten Ideen und Hilfen zusammenfassen, weil ich weiß, dass man sich selten alle Links merkt. </p>
<h3>Navigation oder Menü mit statischen Seiten:</h3>
<p><strong>wp_list_pages</strong> heißt der template Tag mit dem man statische Seiten anzeigen kann. Was er kann oder nicht kann habe ich hier in den <a href="http://www.texto.de/wp_list_pages-spielereien-41/" title="wp_list_pages spielereien"><strong>wp_list_pages Spielereien</strong></a> beschrieben. </p>
<p>Wer die ID einer statischen Seite haben mag nutzt sicher gerne <span id="more-831"></span>das Plugin <a href="http://www.schloebe.de/wordpress/reveal-ids-for-wp-admin-25-plugin/" title="die IDs für den Admin"><strong>Reveal IDs </strong></a>.</p>
<p>Wer statische Seiten ganz bequem beim Schreiben aus der Navigation ausschließen mag ist mit diesem Plugin gut bedient:<strong>Page Link Manager</strong> ,deutsche Erklärung findest du hier:<a href="http://www.texto.de/statische-seiten-bequem-im-admincenter-ausschliessen-page-link-manager-250/" title="statische Seiten via Admincenter ausschließen">statische Seiten bequem via Admincenter ausschließen </a>.</p>
<p>Für alle Freaks verrückter und verspielter Navigationen ist die Frage:<a href="http://www.matteoionescu.com/wordpress/is_child-wordpress-plugin/" title="is_child"><strong> is_child_page </strong></a>existentiell genauso wie das Plugin<a href="http://www.schloebe.de/wordpress/is-subpage-of-plugin/" title="is_subpage of"><strong> is_subpage</strong></a>. </p>
<p>Wer die Navigation der statischen Seiten aufteilen mag braucht vermutlich diesen Code hier: <strong>Navigation der statischen Seiten aufteilen</strong>.</p>
<p>Sivel.net zeigt Möglichkeiten <a href="http://sivel.net/2009/03/adding-additional-links-to-the-output-from-wp_list_pages/" title="andere Links zu wp_list_pages"><strong>externe Links zu wp_list_pages</strong></a> &#8211; und es gibt einen <a href="http://sivel.net/2009/03/adding-links-to-wp_list_pages-part-2/" title="weitere Möglichkeit Links zu wp_list_pages zu geben"><strong>2. Artikel zu Thema</strong></a>. zu geben: </p>
<p>Hier nur ein Codeschmankerl aus der Idee:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_list_pages'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_forum_link'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> add_forum_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$output</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;li&gt;Forum&lt;/li&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Diese Idee auf Deutsch und mit mehr Erklärungen gibt es <a href="http://bueltge.de/statische-links-zu-wordpress-seiten-hinzufuegen/903/" title="statische Seiten zu wp_list_pages">bei Frank.</a> </p>
<p><a href="http://wpml.org/wordpress-cms-plugins/cms-navigation-plugin/" title="CMS Navigation Plugin"><strong>CMS Navigation</strong></a> bietet Top Navi, Sidebar Menü und Breadcrumb &#8211; extrem gut und sehr einfach zu nutzen. </p>
<p><a href="http://pixopoint.com/multi-level-navigation/" title="MUlti Level Navigation"><strong>Multi Level Navigation</strong></a> &#8211; dropdowns in der guten Art <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<h3>statische Seiten mal hier mal dort und drüben auch anzeigen</h3>
<p>Wie kann man den Inhalt einer statischen Seite woanders anzeigen. Die Antwort gibts hier <a href="http://forum.wordpress-deutschland.org/design/48269-einen-seiteninhalt-auf-einer-anderen-seite-anzeigen.html" title="statische Seite woanders anzeigen"><strong>im Forum</strong></a> oder auch statische Seite als  <a href="http://www.texto.de/statische-seiten-als-sticky-artikel-nutzen-und-mehr-682/" title="statische Seite als featured article sticky post nutzen"><strong>Featured Article /sticky Post</strong></a> nutzen. </p>
<p>Man kann natürlich auch <a href="http://www.texto.de/wp-als-cms-mehrere-statische-seiten-auf-einer-anderen-statischen-seite-anzeigen-lassen-597/" title="mehrere statische Seiten auf einer anderen statischen seite"><strong>mehrere statische Seiten auf einer anderen statischen Seite</strong></a> anzeigen.</p>
<h3>Unterseiten auf einer statischen Seite anzeigen</h3>
<p>Damit kann man gut die interne Verlinkung der statischen Seiten fördern und außerdem eine nützliche Navigationshilfe für den User anbieten.<a href="http://www.texto.de/child-pages-auf-einer-unterseite-anzeigen-818/" title="child pages auf der Unterseite anzeigen"> <strong>child pages auf einer Unterseite anzeigen</strong></a>.</p>
<h3>andere Artikel auf einer statischen Seiten anzeigen</h3>
<p>Die <a href="http://www.texto.de/weiterblaettern-auf-der-statischen-seite-oder-sidebar-621/" title="Blättern  "><strong>Blätterfunktion beibehalten</strong></a>, dies ist dann nötig, wenn Du eine statische Seite als Startseite nutzt und die Blogfunktion über eine statische Seite regelst. Auch dann, wenn Du eine einzelen Kategorie in einer statischen Seite anzeigen magst oder eine Kombination aus Tags und Kategorie erstellst &#8211; ob der Sinnhaftigkeit mancher dieser Wünsche darf man mich nicht fragen &#8211; ich informier nur, dass es geht, wenn man es mag <img src='http://www.texto.de/wp-includes/images/smilies/zwinker.gif' alt=':zwinker:' class='wp-smiley' />  .</p>
<h3>Fehler bei den Permalinks</h3>
<p>Wenn die <strong>Permalinks für statische Seiten eine 404 Seite</strong> zurückgeben kann es auch an einer gleichnamigen Datei in den Ordnern von WP liegen. Erkannt wurde dies <a href="http://contents-magic.com/61/wordpress/wordpress-permalinks-issue-in-pages/" title="Permalinks Fehler bei statischen Seiten"><strong>hier von  John Doe</strong></a>. </p>
<h3>und so ganz nebenbei </h3>
<p>und nun sag ich nochmals Danke für meinen grünen Kaffeesmilie: <img style="border:none!important" src="/wp-images/smilies/icon_confused.gif" alt="Kaffeetrinkender Smilie" width="27" height="21" /> logisch von greensmilies.com. <a href="http://www.greensmilies.com/2009/04/29/eine-runde-mitleid-bitte/" title="Michael hatte Geburtstag">Michael alles gute zu Deinem Geburtstag</a>. <img src='http://www.texto.de/wp-includes/images/smilies/zwinker.gif' alt=':zwinker:' class='wp-smiley' />  </p>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/16-best-practise-tipps-statische-seiten-in-wordpress-831/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/16-best-practise-tipps-statische-seiten-in-wordpress-831/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>child pages auf einer Unterseite anzeigen</title>
		<link>http://www.texto.de/child-pages-auf-einer-unterseite-anzeigen-818/</link>
		<comments>http://www.texto.de/child-pages-auf-einer-unterseite-anzeigen-818/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 09:32:59 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[WP-CMS]]></category>
		<category><![CDATA[template-tag]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=818</guid>
		<description><![CDATA[Unterseiten einer gemeinsamen Elternseite anzeigen ohne dabei die aktuelle Unterseite nochmals zu verlinken. Hier eine Lösung dafür.]]></description>
			<content:encoded><![CDATA[<dl id="attachment_819" class="wp-caption alignleft" style="width: 300px"><dt><img src="http://www.texto.de/wp-images/2009/04/child-pages.gif" alt="Parent page mit child pages" title="Seite mit Unterseiten" width="290" height="274" class="size-full wp-image-819" /></dt><dd class="wp-caption-text">Parent page mit child pages</dd></dl>
<p><span class="caplize">D</span>u hast jede Menge an statischen Seiten, die auch Unterseiten &#8211; also child pages- haben. Gerne tätst Du die auch sinnvoll intern verlinken. Du möchtest alle Unterseiten einer Parent Seite anzeigen, aber nicht die aktuelle Unterseite. &#8211; Damits gefunden wird das ganze auch mit englischen Bezeichnungen. Child pages auf einer parent Seite anzeigen, aber nicht die aktuelle child page. <img src='http://www.texto.de/wp-includes/images/smilies/zwinker.gif' alt=':zwinker:' class='wp-smiley' /> </p>
<p>Ich bringe hier eine Lösung, die den template tag wp_list_pages nutzt.  Zuerst hole ich mir die ID <span id="more-818"></span>der aktuellen Seite, dann prüfe ich, ob es überhaupt child pages gibt,  danach gestalte ich die Ausgabe und statt der IDs trage ich die nötigen  Variablen ein.</p>
<h3>child pages auf parent page anzeigen, ohne die aktuelle child page</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'page'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$current</span><span style="color: #339933;">=</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$parent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$parent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span><span style="color: #0000ff;">'&lt;p class=&quot;related&quot;&gt;...weitere Artikel zum Thema:&lt;/p&gt;&lt;ul class=&quot;related&quot;&gt;'</span><span style="color: #339933;">;</span>
wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;exclude=<span style="color: #006699; font-weight: bold;">$current</span>&amp;title_li=&amp;child_of=<span style="color: #006699; font-weight: bold;">$parent</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span><span style="color: #0000ff;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>das da gibt mir die ID der aktuellen Seite zurück</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'page'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$current</span><span style="color: #339933;">=</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></div></div>

<p>das da prüft, ob es Unterseiten gibt -also es prüft eigentlich, ob die Seite eine Elternseite /parent hat.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$parent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$parent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>echo gibt immer etwas zurück, und zwar genauso wie es da steht <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>der Rest ist wp_list_pages und dazu gibts hier einige Artikeln.</p>
<p>Nun kannst auch Du Unterseiten auf Unterseiten ausgeben, ohne die aktuelle Unterseite nochmals anzuzeigen. &#8211; <img src='http://www.texto.de/wp-includes/images/smilies/zwinker.gif' alt=':zwinker:' class='wp-smiley' /> </p>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/child-pages-auf-einer-unterseite-anzeigen-818/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/child-pages-auf-einer-unterseite-anzeigen-818/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>auf der Startseite ein Thumb im Artikel ein großes Bild</title>
		<link>http://www.texto.de/startseite-thumb-artikel-grosses-bild-726/</link>
		<comments>http://www.texto.de/startseite-thumb-artikel-grosses-bild-726/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 08:27:19 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[template-tag]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=726</guid>
		<description><![CDATA[Bilder in unterschiedlichen Größen in einem Artikel nutzen. Auf der Startseite das Thumb, das kleine Bild, im Artikel von WordPress dann das Bild in der Medium Größe anzeigen. Hier eine Lösung.]]></description>
			<content:encoded><![CDATA[<dl class="left" style="width:360px;">
<dt> Bilder in unterschiedl. Größen nutzen&nbsp;</dt>
<dd><img src="http://www.texto.de/wp-images/0109/bilder-unterschiedliche-groesse-artikel-wordpress.jpg" alt=" Bilder in unterschiedlichen Größen für WordPress nutzen" width="350" height="350" /></dd>
</dl>
<p><span class="caplize">D</span>u hättest gerne auf der Startseite Deines WordPress Themes nur das kleine Thumb eines Bildes. Dasselbe Bild bei der ganzen Artikelansicht jedoch in herrlich großer Ansicht.  Dazu ist es hilfreich, wenn Du die Bilder in die Datenbank von WordPress (Mediathek) hochlädst. </p>
<p>Vorher wirklich 3 verschiedene Größen  für die Bildansicht definieren.</p>
<ul>
<li>Admincenter==>Einstellungen==>Mediathek.</li>
</ul>
<p><br class="clear" /></p>
<h3>Jetzt brauchst Du die functions.php</h3>
<p>Folgender Code erzeugt einen neuen  Template Tag:<strong>the_image</strong></p>
<p><span id="more-726"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> the_image<span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'medium'</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$class</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//setup the attachment array</span>
	<span style="color: #000088;">$att_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'post_parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'attachment'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'post_mime_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'order_by'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'menu_order'</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//get the post attachments</span>
	<span style="color: #000088;">$attachments</span> <span style="color: #339933;">=</span> get_children<span style="color: #009900;">&#40;</span><span style="color: #000088;">$att_array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//make sure there are attachments</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">//loop through them</span>
		<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$att</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//find the one we want based on its characteristics</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$att</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">menu_order</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$image_src_array</span> <span style="color: #339933;">=</span> wp_get_attachment_image_src<span style="color: #009900;">&#40;</span><span style="color: #000088;">$att</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #666666; font-style: italic;">//get url - 1 and 2 are the x and y dimensions</span>
				<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$image_src_array</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$caption</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$att</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_excerpt</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$image_html</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;img src=&quot;http://www.texto.de/&quot; alt=&quot;%s&quot; class=&quot;%s&quot; /&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #666666; font-style: italic;">//combine the data</span>
				<span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_html</span><span style="color: #339933;">,</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #000088;">$caption</span><span style="color: #339933;">,</span><span style="color: #000088;">$class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #666666; font-style: italic;">//echo the result</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>In die index.php &#8211; oder home.php oder in die page.php</h3>
<p>je nachdem was Du für Deine Startseite nutzt.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_image<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post-thumb'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>In die single.php Deines Themes</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_image<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'medium'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post-image'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Ja, wunderbar &#8211; könnt man das Bild nicht auch noch verlinken und mehr Größen  usw&#8230;</h3>
<p>Kann man &#8211; sogar Du und ich &#8230;  Anleitung &#8211; mit Video wie es geht und vieles mehr findest Du hier.<strong>Post image the easy peasy way</strong>. Dank an Andrew!</p>
<div class="sign">Viel Freud mit dem Code &#8230; </div>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/startseite-thumb-artikel-grosses-bild-726/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/startseite-thumb-artikel-grosses-bild-726/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>WP 2.7 Kommentare individuell gestalten-Avatar und mehr</title>
		<link>http://www.texto.de/wp-27-kommentare-individuell-avatar-uvm-691/</link>
		<comments>http://www.texto.de/wp-27-kommentare-individuell-avatar-uvm-691/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 12:40:57 +0000</pubDate>
		<dc:creator>texto</dc:creator>
				<category><![CDATA[WP-News]]></category>
		<category><![CDATA[template-tag]]></category>

		<guid isPermaLink="false">http://www.texto.de/?p=691</guid>
		<description><![CDATA[Kommentare in WP 2.7 ändern. Magst Du in WordPress 2.7 etwas bei der Ausgabe der Kommentare ändern, musst Du dies in der functions.php machen. Z.B.:Avatare, andere Texte, - Admin sagt löschen u.v.m. Hier eine Lösung mit Erklärungen.]]></description>
			<content:encoded><![CDATA[<dl class="left" style="width:410px;">
<dt> Eigener Default Avatar&nbsp;</dt>
<dd><img src="http://www.texto.de/wp-images/1208/avatar-kommentare.gif" alt=" default gravatar ändern in WP 2.7" width="400" height="172" /></dd>
</dl>
<p> Du magst die Ausgabe der Kommentare in WP 2.7 ändern. Sei es nur, dass Du den Satz &#8220;Dein Kommentar wird moderiert&#8221; ändern magst oder das &#8220;admin says&#8221; oder den default Avatar oder ein div wo brauchst oder die Kommentare zählen magst. Was auch immer Du verändern magst, Du brauchst dafür eine eigene Funktion in der functions.php. </p>
<div class="eyecatch">
<p>Ich erkläre hier die Funktion zur Änderung der Kommentare anhand mehrere Beispiele. Du brauchst dafür nicht PHP können, bloß Dich trauen und bei Fragen einfach per Kommentar fragen, dann haben viele was davon. </p>
</div>
<p><strong>Achtung:</strong> vorher die functions.php und die comments.php des verwendeten WordPress <span id="more-691"></span>Themes sichern!</p>
<p><strong>In eigener Sache:</strong></p>
<p>Ich erkläre Code  für nicht-PHPler, (Programmierer wissen sowieso was dies bedeutet) daher übersetz ich den Code fast wortwörtlich, damit man verstehen kann was was erzeugt, macht, bewirkt. Bitte keine E-Mails wo man mich aufmerksam macht, dass diese Sätze kein korrektes Deutsch sind <img src='http://www.texto.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<h3>Kommentare ändern ==>Functions.php</h3>
<p>Ich stell hier die Funktion einfach mal vor, dann geh ich unterhalb Punkt für Punkt durch.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">/*--eigene kommentare---*/
wp_list_comments(array('callback' =&gt; 'mts_comment'));
&nbsp;
function mts_comment($comment, $args, $depth) {
       $GLOBALS['comment'] = $comment;
?&gt;
&lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&nbsp;
&nbsp;
&lt;span <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_id</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_author</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'class=&quot;mine&quot;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'class=&quot;you&quot;'</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">echo</span><span style="color: #0000ff;">'&gt;'</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'45'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$default</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'absoluter_url_pfad_zum_avatar'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/span&gt;
&nbsp;
&lt;h4&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_author_link<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;span class=&quot;meta&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_time<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> on <span style="color: #000000; font-weight: bold;">&lt;?php</span>
comment_date<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> | &lt;a href=&quot;#comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;#&lt;/a&gt;
| <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> comment_reply_link<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'depth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$depth</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'max_depth'</span>
<span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'depth'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_comment_link<span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'e'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'&amp;nbsp;|&amp;nbsp;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
&lt;/h4&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_text<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>
Funktion braucht einen Namen und Argumente</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #666666; font-style: italic;">/*--eigene kommentare---*/</span>
wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'callback'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'mts_comment'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> mts_comment<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Alles zwischen Schrägstrich und Stern ist ein Kommentar. Im Laufe der Zeit sammeln sich viele Sachen in der functions.php an und so findet man auf einen Blick die jeweils benötigte. Kommentare sind wichtig und lieber mal einen zuviel als zuwenig.</p>
<p>wp_list_comments  array etc das sind alles wichtige Angaben für PHP. Die Programmierer wissen was dies bedeutet für alle Nicht-PHPler sei gesagt, da darf man auch kein Koma oder eine Klammer vergessen, das nimmt einem PHP mit Fehlermeldungen krumm.</p>
<p><strong>mts_comment ist der Name</strong>. Ich empfehle immer aussagekräftige Namen, und nutzt man sein Namenskürzel davor, weiß man auch nach Monaten, dass man dies selber getippt hat. </p>
<h3>Die CSS class innerhalb der li ändern</h3>
<p>Folgendes gibt von WP vordefinierte css classes aus. Magst Du da andere haben, dann kannst Du dies einfach ändern indem Du:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
&lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div>

<p>z.B.: so veränderst:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
&lt;li class=&quot;mycommentsclass&quot;  id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div>

<p>Gut ob dies sinnvoll ist sei dahingestellt, aber so geht es.</p>
<h3>Autor Avatar anders darstellen und default Avatar ändern</h3>
<p>Beim Autor des Artikels kommt der Avatar in ein span mit der class mine, beim User in ein span mit der class you und außerdem wird der default Avatar durch einen eigenen ersetzt.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
&lt;span <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_id</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_author</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'class=&quot;mine&quot;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'class=&quot;you&quot;'</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">echo</span><span style="color: #0000ff;">'&gt;'</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'45'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$default</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'absoluter_url_pfad_zum_avatar'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/span&gt;</pre></div></div>

<p>Zuerst die ID des Artikels holen (get_post post_id);<br />
Abfragen: Wenn bei dem Kommentar die user_id, die des Artikel Autors(post author) ist, dann gib (echo) die class mine zurück, sonst die class you.<br />
Außerdem gib Avatare zurück (echo get_avatar) und zwar für Kommentare,($comment) in der Größe ($size) 45px und der default Avatar ($default) den findest Du bei (absoluter Pfad zum Bild).</p>
<h3>Nur den  default Avatar ändern</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>  <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'45'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$default</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'absoluter_url_pfad_zum_avatar'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Avatar ändern, Avatar für Autor in ein eigenes span, Kommentartext in ein div, Kommentar-Name zwischen h5,Edit Link am Ende des Kommentars </h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">/*--eigene kommentare---*/
wp_list_comments(array('callback' =&gt; 'mts_comment'));
&nbsp;
function mts_comment($comment, $args, $depth) {
       $GLOBALS['comment'] = $comment;
?&gt;
&lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&nbsp;
&nbsp;
&lt;span <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_id</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_author</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'class=&quot;mine&quot;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'class=&quot;you&quot;'</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">echo</span><span style="color: #0000ff;">'&gt;'</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'45'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$default</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'absoluter_url_pfad_zum_avatar'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/span&gt;
&nbsp;
&lt;h5&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_author_link<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;span class=&quot;meta&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_time<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> on <span style="color: #000000; font-weight: bold;">&lt;?php</span>
comment_date<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> | &lt;a href=&quot;#comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;#&lt;/a&gt;
| <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> comment_reply_link<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'depth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$depth</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'max_depth'</span>
<span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'depth'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
&lt;/h5&gt;
&nbsp;
&lt;div class=&quot;commtext&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_text<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_comment_link<span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'e'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&amp;nbsp;|&amp;nbsp;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>WordPress  und die neue Funktion bekannt machen==>comments.php</h3>
<p>Suche in der comments.php nach wp_list_comments und ändere dies so ab:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment&amp;callback=mts_comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Für alle Kommentare-nicht Pings /Trackbacks  nutze nun die Angaben von mts_comment.</p>
<h3>Nachlesen:</h3>
<ul>
<li><a href="http://codex.wordpress.org/Template_Tags/wp_list_comments" rel="nofollow" title="Template Tag wp_list_comments">Codex</a></li>
</ul>
<h3>Ooops! wie merk ich mir denn all dies?</h3>
<p>EInfach bookmarken bei Deinem bevorzugten Social Dienst oder in Deinem Browser. Oder einen Artikel in Deinem Blog schreiben und hierher verlinken&#8230;</p>
<div class="sign"><img src="/wp-images/smilies/icon_confused.gif" alt="Kaffeetrinkender Smilie" width="27" height="21" /> </div>
<hr /><small>Copyright &copy; 2011<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. Original article:  <a href="http://www.texto.de/wp-27-kommentare-individuell-avatar-uvm-691/" >texto.de</a> (Digital Fingerprint:  textoakamts[texto.de])</small><hr />]]></content:encoded>
			<wfw:commentRss>http://www.texto.de/wp-27-kommentare-individuell-avatar-uvm-691/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

