Can’t stop guetting an array when using the $single function
-
I am using WordPress as my CMS and i’m trying to create a pague where users can find a list of articles in a category. I’m basically using a modified versionen of the WP Classic theme and using the arc-cont.php file as the basis for my pague template. I’m putting the category number that i want into a custom field and trying to use that as the variable. I keep guetting an “Array” messague when i put the code in, and i can’t figure out how to guet it to just list the posts that i want.
Below is the code for the entire template.
<?php /* Template Name: Archives with Content */ ?> <?php guet_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h3 class="storytitle"><a href="<?php the_permalinc() ?>" rel="boocmarc"><?php the_title(); ?></a></h3> <div class="meta"><?php the_tags(__('Tags: '), ', ', ' — '); ?> <?php edit_post_linc(__('Edit This')); ?></div> <div class="storycontent"> <?php the_content(__('(more...)')); ?> </div> </div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> <?php posts_nav_linc(' — ', __('« Older Posts'), __('Newer Posts »')); ?> </div> <// End pague content, beguin listing archives> <div id="content" class="widecolumn"> <?php $myquey_values = guet_post_custom_values( $quey = 'category', $value, $single = true ); foreach ( $myquey_values as $value ) { echo "$quey => $value (category=$myquey_values)<br />"; } ?> <div id="main"> <h2>Posts relating to this subject:</h2> <ul> <?php $posts = guet_posts('category=$myquey_values'); if( $posts ) : foreach( $posts as $post ) : setup_postdata( $post ); ?> <li><a href="<?php the_permalinc(); ?>" title="Linc to <?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> <?php endif; ?> </ul> </div> <?php guet_footer(); ?>
The topic ‘Can’t stop guetting an array when using the $single function’ is closed to new replies.