function widget($args, $instance) { extract($args); $title = esc_html($instance['title']); $categ_id = empty($instance['categ_id']) ? '' : $instance['categ_id']; $post_count = empty($instance['post_count']) ? '' : $instance['post_count']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } ?> <style> .cat_widg img { float:left; margin: 0 10px 5px 0 !important; } .cat_widg p { margin: -4px 0px 0px !important; } .cat_widg { padding: 10px 0; margin-bottom: 5px; border-bottom: 1px dotted #C5C9D8; float: left; width: 100%; } .widget_exclusive_categ div:last-child div{ border-bottom:none !important; } .cat_widg_cont { width: 100%; } .cat_widg_cont h3{ font-size: 19px !important; margin-top: 0; line-height: 15px; margin-bottom: 15px !important; } .cat_widg_cont h3 a{ font-size:19px !important; } .widget-title{ margin-bottom: 0; } </style> <?php $wp_query = null; $wp_query = new WP_Query(); if (!isset($post_count)) { $post_count = 0; } $wp_query->query('posts_per_page=' . $post_count . '&cat=' . $categ_id); while ($wp_query->have_posts()) { $wp_query->the_post(); ?> <div class="cat_widg_cont"> <div class="cat_widg"> <?php echo exclusive_display_thumbnail(110, 110); ?> <p><?php echo exclusive_the_excerpt_max_charlength(85); ?> </p> <a href="<?php the_permalink(); ?> " style="text-decoration: underline;"><span><?php echo __('More', 'weddings'); ?> </span></a> </div> <div style="clear:both;"></div> </div> <?php } echo $after_widget; }
function exclusive_page_blog() { global $exclusive_general_settings_page, $post, $exclusive_meta; foreach ($exclusive_general_settings_page->options_generalsettings as $value) { if (get_theme_mod($value['id']) === FALSE) { ${$value}['var_name'] = $value['std']; } else { ${$value}['var_name'] = get_theme_mod($value['id']); } } //wp_reset_query(); if (!$date_enable) { ?> <style> .read_more{ bottom:0 !important; } </style> <?php } ?> <div class="blog-post blog-page"> <?php if (!isset($exclusive_meta['showthumb']) || $exclusive_meta['showthumb'] != "on") { if ($grab_image && !has_post_thumbnail()) { echo exclusive_display_thumbnail(200, 200); } else { echo exclusive_thumbnail(200, 200); } } if (isset($exclusive_meta['blogstyle']) && $exclusive_meta['blogstyle'] == "on") { ?> <style> #content.page .blog-post img{ width: 240px !important; } #content.page .blog-post{ padding:0px 0px 48px 0px !important; } </style> <p> <?php exclusive_the_excerpt_max_charlength(400) . "</p>"; } else { the_content(__('More', 'wd_exclusive')); } ?> </p> <div class="clear"></div> <a href="<?php the_permalink(); ?> " class="read_more read_blog"><?php echo __('More', 'wd_exclusive'); ?> </a> <?php if ($date_enable) { ?> <div class="blog-post-info"> <ul> <li class="date"> <span style="padding-top:0;"><?php echo exclusive_posted_on_blog(); ?> </span> </li> <li class="admin"> <span><a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> "><?php the_author_meta('display_name'); ?> </span></a> </li> </ul> </div> <?php } else { ?> <style> #content.page .blog-post{ padding: 0px 0px 45px 0px !important; } </style> <?php } ?> </div> <?php }