The site that I am working on is:
http://www.thewrightrecipes.com
I'm trying to build a "Recipe Index" page. I started by installing the AZIndex plugin and thought that this would work great. I could create a custom field with the recipe title (seldom the same as the post title) and sort by Category/custom field. Unfortunately, there is often more than 1 recipe per post. While I could add numerous custom fields to each post with the same key, AZIndex will only return 1 value per post.
I’d like to build an index page making use of php code to return custom field values. I think that I could hack my way through it if I even knew where to begin. How do you create pages using custom php code like this:
<ul>
<?php
$sweets = get_posts('category=7&numberposts=-1&orderby=post_name&order=ASC');
foreach($sweets as $post) : setup_postdata($post);
?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<?php $sweets = get_post_meta($post->ID, "sweets", $single = true);
if($sweets !== '') {
echo 'by ' . $sweets;
} ?>
</li>
<?php endforeach; ?>
</ul>
Where does that go? Is this too basic of a question? Any help would be appreciated.
Thanks