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
Jan 14
Probably one of the most undervalued features of WordPress are its category structure and commands. The category feature of WordPress can change a blog into a powerful CMS (Content Management System) tool.
One of my friends, didn’t want to use a real calendar for events since many of them are general, like “Fall 2008″, so I decided to use Posts and Categories instead. Though the process of maintaining these events are manual, it really works well for them.
I split the sidebar into different sections. The sections marked, “Events”, “Classes” and “Trunk Show” are three different categories. Actually, they are sub-categories of the main category “Events & Classes”, which you’ll find in the Menu section on the top right.
When he wants to create an Event, he just writes a normal post and select the “Events” category. The Post automatically appears in the Categories proper place in the sidebar. The same with creating “Classes” or “Trunk Shows”. You’ll also notice that the post does not appear on the home page. That is because I used the static front page option, which you’ll find under: Options - Reading - Front Page.
Since these are all sub-categories of the main category “Events & Classes”, when you click on the “Events & Classes” link in the Menu section you get a list of all the posts under all the sub-categories. Essentially allowing you to view all the Events, Classes and Trunk Shows on one page.
You’ll notice at the bottom of the “Events & Classes” page there’s a link marked “See our past Events and Classes”. This is another category. Once an event date passes, our client edits the Post, unchecks the current category, and then checks “Past Events and Classes”. The post is removed from it’s section (category) in the sidebar, and is added to the “Past Events and Classes” page.
NOTE: WordPress doesn’t do a very good job of displaying different categories separately in the sidebar. We used Scott Reilly’s “Customizable Post Listings” Plugin, which you can find here.
Hopefully this post will inspire you to be creative with WordPress Categories, I’ll post later a better tutorial with real examples!
Tags: cms, events, ice, posts, static page, tutorial, used
Jan 14
Here is something interesting. It’s a fully web-based Wordpress Theme Generator! All you have to do is input your parameters - like font style and color, column widths and border styles -, then hit ‘Save’, and the website delivers your personal Wordpress theme in an instant, ready for download.

This is quite impressive on first glance. But be warned: this generator doesn’t use the full power of Wordpress at all! It merely generates source code for very simple purposes. If you don’t know anything at all about Wordpress or web development (mainly HTML, CSS, PHP), then you can try this site and see what it can do for you. But if you want really good designs and a sophisticated Wordpress template, you should better stick to the ones you can get all over the web or here on Beeex.net - for free as well.
See for yourself! Click here to go to the Wordpress Theme Generator.
Dec 26
Ich stand vor kurzen vor dem Problem, dass ich das Aussehen meines Blogs http://www.flimmerblog.de unterschiedlich haben wollte, je nachdem, ob man eingeloggt ist, doer auch nicht.
Ich habe hierzu sozusagen einen zweiten Blog dazu gemerged, da sich der Membersbereich auf einer anderen Subdomain und einem anderen Verzeichnis befinden sollte. Aber erstmal eins nach dem anderen:
1. Ein komplettes Backup fahren, sowohl Webspace als auch Datenbank!!!
2. Die Tabelle “wp_options” duplizieren. (”wp_” steht für das gewählte Präfix) Die neue Tabelle “members_options” nennen.
3. Den kompletten Webspace in das neue Verzeichnis kopieren, in das der Membersbereich kommen soll.
4. Im MEMBERS Verzeichnis die Datei /wp_settings.php öffnen und folgendes suchen:
// Table names
$wpdb->posts = $wpdb->prefix . 'posts';
$wpdb->users = $wpdb->prefix . 'users';
$wpdb->categories = $wpdb->prefix . 'categories';
$wpdb->post2cat = $wpdb->prefix . 'post2cat';
$wpdb->comments = $wpdb->prefix . 'comments';
$wpdb->link2cat = $wpdb->prefix . 'link2cat';
$wpdb->links = $wpdb->prefix . 'links';
$wpdb->options = $wpdb->prefix . 'options';
$wpdb->postmeta = $wpdb->prefix . 'postmeta';
$wpdb->usermeta = $wpdb->prefix . 'usermeta';
$wpdb->terms = $wpdb->prefix . 'terms';
$wpdb->term_taxonomy = $wpdb->prefix . 'term_taxonomy';
$wpdb->term_relationships = $wpdb->prefix . 'term_relationships';
hier nun die Zeile: $wpdb->options = $wpdb->prefix . 'options';
ändern in: $wpdb->options = 'members_options';
Das war es. Nun werden bis auf die Options alle Tabellen von der original Wordpress-Installation verwendet. Das Verzeichnis MEMBERS kann nun mittels .htaccess oder ähnlichem Passwort geschützt werden. Einträge werden von beiden Domains/Verzeichnissen aus in die selben Tabellen vorgenommen.
Eine einfache und schnelle Möglichkeit Redundanz von Daten entgegenzuwirken.
Tags: datenbank, duplizieren, htaccess, members, passwortschutz, prefix, tabellen, tutorial, wp_options, wp_settings