Displaying Posts Using a Custom Select Query

September 22, 2007

The practical example, outlined below, demonstrates a process of selecting all posts with a particular Custom Field value stored, and displaying them in a Page based on a Page Template.

http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query

Customized Query in Wordpress

September 18, 2007

HTML:
  1. <?php
  2. $get_children = $wpdb->get_results('SELECT * FROM your category table WHERE category_parent = "The cat_ID of the parent that you want"');
  3. foreach ($get_children as $child) {
  4. echo '<li><a href="./?cat='.$child->cat_ID.'" title="View all posts filed under '.$child->cat_name.'">'.$child->cat_name.'</a></li>';
  5. }
  6. ?>
  7. </ul>

SandPress Wordpress Theme

August 9, 2007


Link | Demo | Download