View Single Post
  #4 (permalink)  
Old 02-15-2008, 08:38 PM
jamestl2 jamestl2 is offline
Senior Member
 
Join Date: Mar 2007
Location: What of it?
Posts: 681
jamestl2 is on a distinguished road
Default

This is probably something you'd want to ask over in the WP.org support forums, as they'd be much more knowledgeable on the subject.

One more thing I may suggest ATM is looking at this basic tutorial:
Using WordPress Custom Fields: Introduction: Using WordPress Custom Fields tutorial series

This quote from the article *might* be able to apply to what you want:
Quote:
What do I do with this information? You can pull this information out in posts, on other pages, into sidebars, or wherever.

To give a list of your book reviews in alphabetical order with the author’s name, you could create a custom field with a Key named “author” and a Value of “The Author’s Name” for several posts, or reviews. After writing these reviews and putting them into your “Book Reviews” category, you would put together a page called “Book Reviews” or create a category-specific template for your “Book Reviews” category.

Here’s how you would list each book review (category=27 would need to be changed to your “Book Reviews” category ID):
Code:
<ul>
<?php
$book_reviews = get_posts('category=27&numberposts=-1&orderby=post_name&order=ASC');
foreach($book_reviews as $post) : setup_postdata($post);
?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<?php $author = get_post_meta($post->ID, "author", $single = true);
	if($author !== '') {
	echo 'by ' . $author;
	} ?>
</li>
<?php endforeach; ?>
</ul>
__________________
Lightning Shock - My Website
Wordpress Mountain
- Wordpress Resources and Community
Reply With Quote