4.24.2010, Tutorials, Wordpress By Patrick
1

A dynamic theme in WordPress is key if you want to have a clean and organize site. WordPress offers ways to completely change a theme based on whatever the current page is.

One of the first sites I made in WordPress consisted of a bunch of different pages within my theme. Later on I found out that all my pages could be compiled into one, using the tricks below.

The Problem: You want to display the subpages of the current page
The Solution:

wp_list_pages("child_of=".$post->ID."&title_li=");

The Problem: You want to display the subpages of a different page other than the current one
The Solution:

$page = get_page_by_title('Residences');
wp_list_pages("child_of=".$page->ID."&title_li=");


The Problem:
You want to test to see if the current post is in a curtain category
The Solution:

if (in_category('home')) {//is category}

2.28.2010, Wordpress By Patrick
0

All the themes below came from freethemelayouts.com , freethemelayouts is one of the best places I have found for WordPress themes.