[Plugin: Featured Custom Posts Widget] Featured CP Widget: Widget not closed
-
The widget isn’t closed because $args get’s overwritten:
echo $args['before_widget'] . $args['before_title'] . $args['title'] . $args['after_title']; # works [...] $args = array( 'post_type' => $args['post_type'], 'posts_per_page' => $args['num'], 'tax_query' => $tax_query); $loop = new WP_Query( $args ); # args gets overwritten [...] echo $args['after_widget']; # doesn't work - widget destroys markupEasily fixed by renaming the second $args to something else:
$args2 = array( 'post_type' => $args['post_type'], 'posts_per_page' => $args['num'], 'tax_query' => $tax_query); $loop = new WP_Query( $args2 );🙂
http://ww.wp.xz.cn/extend/plugins/featured-custom-posts-widget/
The topic ‘[Plugin: Featured Custom Posts Widget] Featured CP Widget: Widget not closed’ is closed to new replies.