esc_html__('Displays the random posts from your site.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-random-posts-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $number = !empty($instance['number']) ? $instance['number'] : 5; $title = !empty($instance['title']) ? $instance['title'] : ''; ?>

$number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'orderby' => 'rand', 'no_found_rows' => true )); ?> have_posts()) : $random_posts->the_post(); ?>

esc_html__('Displays the popular posts, recent posts and the recent comments in the tabs.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-tabbed-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $number = !empty($instance['number']) ? $instance['number'] : 5; ?>

id_base) || is_customize_preview()) { wp_enqueue_script('jquery-ui-tabs'); } $number = !empty($instance['number']) ? $instance['number'] : 5; echo $args['before_widget']; ?>
$number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'no_found_rows' => true )); ?> have_posts()) : $get_recent_posts->the_post(); ?>

query(array('number' => $number, 'status' => 'approve')); $commented = ''; $commented .= ''; echo $commented; ?>
esc_html__('Displays the latest posts or posts from certain category chosen to be used as the slider.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-posts-slider-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $number = !empty($instance['number']) ? $instance['number'] : 4; $type = !empty($instance['type']) ? $instance['type'] : 'latest'; $category = !empty($instance['category']) ? $instance['category'] : ''; ?>


id_base) || is_customize_preview()) { wp_enqueue_script('jquery-bxslider'); } $number = !empty($instance['number']) ? $instance['number'] : 4; $type = isset($instance['type']) ? $instance['type'] : 'latest'; $category = isset($instance['category']) ? $instance['category'] : ''; echo $args['before_widget']; ?> $number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'no_found_rows' => true )); } else { $category_posts_slider = new WP_Query(array( 'posts_per_page' => $number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'category__in' => $category, 'no_found_rows' => true )); } ?>
have_posts()) : $category_posts_slider->the_post(); ?>

esc_html__('Displays the latest posts or posts from certain category chosen to be used in beside the slider area.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-posts-grid-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $number = !empty($instance['number']) ? $instance['number'] : 4; $type = !empty($instance['type']) ? $instance['type'] : 'latest'; $category = !empty($instance['category']) ? $instance['category'] : ''; ?>


$number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'no_found_rows' => true )); } else { $category_posts_grid = new WP_Query(array( 'posts_per_page' => $number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'category__in' => $category, 'no_found_rows' => true )); } ?>
have_posts()) : $category_posts_grid->the_post(); ?>

esc_html__('Displays the latest posts or posts from certain category chosen to display the posts in single column.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-one-column-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $title = !empty($instance['title']) ? $instance['title'] : ''; $text = !empty($instance['text']) ? $instance['text'] : ''; $number = !empty($instance['number']) ? $instance['number'] : 5; $type = !empty($instance['type']) ? $instance['type'] : 'latest'; $category = !empty($instance['category']) ? $instance['category'] : ''; ?>


$number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'no_found_rows' => true )); } else { $category_column_one = new WP_Query(array( 'posts_per_page' => $number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'category__in' => $category, 'no_found_rows' => true )); } ?> ' . esc_html($title) . ''; } if (!empty($text)) { ?>

have_posts()) : $category_column_one->the_post(); if ($i == 1) { echo '
'; $featured_image_size = 'the-newsmag-featured-medium-thumbnail'; } elseif ($i == 2) { echo '
'; $featured_image_size = 'the-newsmag-featured-small-thumbnail'; } // adding the class name upon thumbnail availablility if (has_post_thumbnail()) { $class = 'has-featured-image'; } else { $class = 'no-featured-image'; } ?>

'; } $i++; endwhile; if ($i > 2) { echo '
'; } // Reset Post Data wp_reset_postdata(); ?>
esc_html__('Displays the latest posts or posts from certain category chosen to display the posts in double column.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-two-column-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $title = !empty($instance['title']) ? $instance['title'] : ''; $text = !empty($instance['text']) ? $instance['text'] : ''; $number = !empty($instance['number']) ? $instance['number'] : 5; $type = !empty($instance['type']) ? $instance['type'] : 'latest'; $category = !empty($instance['category']) ? $instance['category'] : ''; ?>


$number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'no_found_rows' => true )); } else { $category_column_two = new WP_Query(array( 'posts_per_page' => $number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'category__in' => $category, 'no_found_rows' => true )); } ?> ' . esc_html($title) . ''; } if (!empty($text)) { ?>

have_posts()) : $category_column_two->the_post(); if ($i == 1) { echo '
'; $featured_image_size = 'the-newsmag-featured-medium-thumbnail'; } elseif ($i == 2) { echo '
'; $featured_image_size = 'the-newsmag-featured-small-thumbnail'; } // adding the class name upon thumbnail availablility if (has_post_thumbnail()) { $class = 'has-featured-image'; } else { $class = 'no-featured-image'; } ?>

'; } $i++; endwhile; if ($i > 2) { echo '
'; } // Reset Post Data wp_reset_postdata(); ?>
esc_html__('Displays the latest posts or posts from certain category chosen to display the posts and its excerpt.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-posts-extended-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $title = !empty($instance['title']) ? $instance['title'] : ''; $text = !empty($instance['text']) ? $instance['text'] : ''; $number = !empty($instance['number']) ? $instance['number'] : 5; $type = !empty($instance['type']) ? $instance['type'] : 'latest'; $category = !empty($instance['category']) ? $instance['category'] : ''; ?>


$number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'no_found_rows' => true )); } else { $category_extended = new WP_Query(array( 'posts_per_page' => $number, 'post_type' => 'post', 'ignore_sticky_posts' => true, 'category__in' => $category, 'no_found_rows' => true )); } ?> ' . esc_html($title) . ''; } if (!empty($text)) { ?>

have_posts()) : $category_extended->the_post(); // adding the class name upon thumbnail availablility if (has_post_thumbnail()) { $class = 'has-featured-image'; } else { $class = 'no-featured-image'; } ?>

esc_html__('Add the required 728 x 90 advertisement in your site with the help of the image.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-728x90-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $title = !empty($instance['title']) ? $instance['title'] : ''; $image_link = !empty($instance['image_link']) ? $instance['image_link'] : ''; $image_url = !empty($instance['image_url']) ? $instance['image_url'] : ''; ?>

'; echo $output; } ?>
esc_html__('Add the required 300 x 250 advertisement in your site with the help of the image.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-300x250-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $title = !empty($instance['title']) ? $instance['title'] : ''; $image_link = !empty($instance['image_link']) ? $instance['image_link'] : ''; $image_url = !empty($instance['image_url']) ? $instance['image_url'] : ''; ?>

'; echo $output; } ?>
esc_html__('Add the required 125 x 125 advertisement in your site with the help of the image.', 'the-newsmag'), 'classname' => 'widget-entry-meta the-newsmag-125x125-widget clear') // Arguments of the widget, here it is provided with the description ); } function form($instance) { $title = !empty($instance['title']) ? $instance['title'] : ''; for ($i = 1; $i < 7; $i++) { $instance['image_link' . $i] = !empty($instance['image_link' . $i]) ? $instance['image_link' . $i] : ''; $instance['image_url' . $i] = !empty($instance['image_url' . $i]) ? $instance['image_url' . $i] : ''; } ?>

'; echo $output; } ?>