Just to put it simple, i’ve a Wp_query declaration like this:
<?php $recent = new WP_Query("category_name=xyz&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
and i want to replace the category name with a variable, this one;
<?php echo ($title1) ? stripslashes($title1) : “”;?>
How can i merge the codes and make this happen?
- The topic ‘Wp_query and variables’ is closed to new replies.