php - wordpress wp_query with redux option is not working -
i want have ability choose category theme option panel & ll show posts exact particular category.
so have setup wp_query this:
<?php $featured_rcp= $redux_imd['featured_rcp']; $catquery = new wp_query(array( 'category' => $featured_rcp, 'posts_per_page' => 1 )); while($catquery->have_posts()) : $catquery->the_post(); ?> & theme option panel code is:
'id' => 'featured_rcp', 'type' => 'select', 'data' => 'categories', 'multi' => true, 'title' => __('recipe category.', 'imd'), 'subtitle' => __('recipe category home page.', 'imd') but showing posts categories, not 1 select option panel. though posts per page working fine. i'm not versed in php, please 1 tell me i'm doing wrong here.
the category parameter of wp_query wrong, should cat or category_name, depending on type of value.
check out category parameters of wp_query , choose 1 need.
Comments
Post a Comment