function wedding_style_news_page() { global $wedding_style_general_settings_page, $post, $web_business_meta; foreach ($wedding_style_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($web_business_meta['showthumb'])) { if ($grab_image) { echo wedding_style_display_thumbnail(240, 182); } else { echo wedding_style_thumbnail(240, 182); } } else { if ($web_business_meta['showthumb'] != "on") { if ($grab_image) { echo display_thumbnail(220, 220); } else { echo _thumbnail(220, 220); } } } if ($blog_style) { the_content(__('More', 'WeddingStyle')); } else { the_excerpt(); } ?> </div> <?php }
function widget($args, $instance) { extract($args); $title = esc_html($instance['title']); $testimonials_id = empty($instance['testimonials_id']) ? '' : $instance['testimonials_id']; $post_count = empty($instance['post_count']) ? '' : $instance['post_count']; $border_radius = empty($instance['border_radius']) ? '' : $instance['border_radius']; echo $before_widget; $id = $this->get_field_id('title'); if ($title) { echo $before_title . $title . $after_title; } ?> <style> .testim_widg_cont<?php echo $id; ?> .testim_widg img { float:left; margin: 0 10px 10px 0; border-radius: <?php echo $border_radius; ?> px; } .testim_widg { border-bottom: 1px solid #E7E3E3; min-height: 95px; } .testim_widg_cont<?php echo $id; ?> > div:last-child > div { border-bottom: 0px !important } .testim_widg_cont<?php echo $id; ?> .testim_widg img { margin-top: 12px; width: 65px; height: 65px; } .widget_wedding_style_exclusive_testimonials div:last-child div{ border-bottom:none !important; } .testim_widg_cont { float: left; width: 100%; } .testim_widg_cont h3{ margin-top: 0; line-height: 15px; margin-bottom: 15px !important; } .testim_widg_cont h3 a{ font-size:20px !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('showposts=' . $post_count . '&cat=' . $testimonials_id); while ($wp_query->have_posts()) { $wp_query->the_post(); ?> <div class="testim_widg_cont<?php echo $id; ?> "> <div class="testim_widg"> <?php echo wedding_style_display_thumbnail(150, 150); ?> <h3> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> </h3> <p> <?php echo wedding_style_the_excerpt_max_charlength(50); ?> <a href="<?php the_permalink(); ?> " style="text-decoration: underline;"><span><?php echo __('More', 'WeddingStyle'); ?> </span></a></p> </div> </div> <?php } wp_reset_postdata(); echo $after_widget; }