diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/selecta/ocmx/widgets/feature-post-widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/selecta/ocmx/widgets/feature-post-widget.php Fri Mar 12 13:29:04 2010 +0000 @@ -0,0 +1,126 @@ + "Features Posts widget for the Home Page. Place only in the 'Header Panel'.")); + } + + /** @see WP_Widget::widget */ + function widget($args, $instance) { + extract( $args ); + if(!($instance["post_category"])) : + $use_catId = 0; + else : + $use_category = $instance["post_category"]; + $use_catId = get_category_by_slug($use_category); + endif; + //Fetch the category for the widget + $post_args = array('numberposts' => '5', 'offest' => 0, 'orderby' => 'post_date', 'order' => 'DESC','cat' => $use_catId->term_id); + //Set the post Aguments and Query accordingly + $count = 1; + $ocmx_featured = get_posts($post_args); +?> +