Feb 09
Feb 09
Das Template-Tag get_archives( ) wird normalerweise dazu benutzt, um Posts zu einer bestimmten Kategorie anzuzeigen. Anwendung z.B. für die Sidebar wie folgt:
<h2>Recent Posts</h2>
<ul>
<?php get_archives( 'postbypost', 6 ); ?>
</ul>
Hat man nun viele Kategorien und möchte Artikel zu einer ganz bestimmten Kategorie herausfischen, so muß man eine eigene kleine Datenbankabfrage hinzufügen, was in Wordpress aber reletiv einfach ist:
<ul>
<?php
$recent = new WP_Query( "cat=1&showposts=10" );
while( $recent->have_posts( )): $recent->the_post( );
?>
<li><a href="<?php the_permalink( ); ?>" rel="bookmark">
<?php the_title( ); ?></a>
</li>
<?php endwhile; ?>
</ul>
Das ist also noch recht übersichtlich. Die gewünschte Kategorie-ID holt man sich aus dem Backend (der Adminoberfläche) von Wordpress, unter “Verwalten” / “Kategorien” steht die ID zu jeder Kategorie in der ersten Spalte.
Viel Spaß damit
Tags: datenbank, kategorien, Right sidebar, tabellen, widget, Wordpress
Feb 07
Wordpress by default, just like other blogging platforms, has automatically been adding the “nofollow” microformat extension to all links from user generated content such as comments and trackbacks. To support the growing rejection of NoFollow for blog comments, I have compiled this list of plugins that help you remove nofollow from your blog forever.
Tags: doFollow, domain, GoodLinks, nofollow, Ping, Plugins, SeoPedia, target, trackbacks, URL, user generated content, Wordpress