Custom field code — what is wrong with this?
-
I have a piece of code that isn’t working and I can’t figure out what is wrong with it. (some of my code is being truncated, by the forum, but hopefully the important stuff is showing up)….
<?php foreach($results as $cat){ ?> <h3 ><a href="<?php echo get_category_link($cat->cat_ID); ?>"> <?php echo $cat->cat_name; ?></a></h3> <select name="category" style="font-family: arial,verdana, sans-serif;font-size:9pt" onchange="MM_jumpMenu('parent',this,0)"> <option value="">Sermon Series on <?php echo $cat->cat_name; ?></option> <?php query_posts('category_name='. $cat->cat_name . '&showposts=-1&order=ASC'); ?> <?php while (have_posts()) : the_post(); ?> <option value="<?php the_permalink(); ?>"> <?php the_title(); ?> <?php get_post_custom_values('Subtitle'); ?> </option> <?php endwhile; ?> </select>
This works for the most part, displaying a drop-down list of posts in the category. I am trying to add a custom field value, so that the list shows titles AND subtitles. But the code for subtitle is not working, and I can’t see the mistake.
<?php get_post_custom_values('Subtitle'); ?>
This works elsewhere just fine, but in this drop down list, I only get the word “Array” in it’s place. I hope someone who hasn’t grown code-blind over this can help me. I am probably missing something obvious.
Thanks in advance. ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom field code — what is wrong with this?’ is closed to new replies.