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_services() { global $exclusive_general_settings_page, $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']); } } ?> <div class="entry"> <?php if (!isset($exclusive_meta['showthumb']) || $exclusive_meta['showthumb'] != "on") { if ($grab_image) { echo exclusive_display_thumbnail(220, 220); } else { echo exclusive_thumbnail(220, 220); } } ?> <a href="<?php the_permalink(); ?> "> <h3><?php the_title(); ?> </h3> </a> <?php if (isset($exclusive_meta['blogstyle']) && $exclusive_meta['blogstyle'] == "on") { the_content(__('More', 'wd_exclusive')); } else { the_excerpt(); } ?> </div> <?php }