scx316 Posted September 30, 2010 Share Posted September 30, 2010 I'm trying to code a featured panel in the category section of wordpress. I'm trying to pull articles that are in both the category for the page and the featured category. I got it to pull from the current category but no the featured. <?php $myPosts .= "0"; add_filter('posts_where', 'post_strip'); ?> <?php $category_id = get_cat_ID(single_cat_title("", false)); ?> <?php $features = new WP_query(); $features->query('showposts='.$options['featured_n'].'&cat='.$category_id.'&'.$options['featured']); ?> <?php global $wp_query; $wp_query->in_the_loop = true; ?> This is the line with the problem. <?php $features = new WP_query(); $features->query('showposts='.$options['featured_n'].'&cat='.$category_id.'&'.$options['featured']); ?> and here is a link to the live page http://www.frontsidebus.net/category/gadgets/ Any help is appreciated Link to comment https://forums.phpfreaks.com/topic/214805-need-help-with-syntax/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.