function wedding_style_page_blog()
{
    global $wedding_style_general_settings_page, $post, $web_dorado_meta_date;
    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']);
        }
    }
    //wp_reset_query();
    if (!$date_enable) {
        ?>
		<style>
		.read_more{
			bottom:0 !important;
		} 
		</style>
	<?php 
    }
    ?>
	<div class="blog-post blog-page">	
		<?php 
    if (!isset($web_dorado_meta_date['showthumb']) || $web_dorado_meta_date['showthumb'] != "on") {
        ?>
		<div class="image-block">
			<?php 
        if ($grab_image && $date_enable) {
            echo wedding_style_posted_on_blog();
        }
        if ($grab_image && !has_post_thumbnail()) {
            echo wedding_style_display_thumbnail(240, 182);
        } else {
            echo wedding_style_thumbnail(240, 182);
        }
        ?>
		</div>
		<?php 
    }
    ?>
		<h3>
			<a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
</a>
		</h3>
		<?php 
    if (isset($web_dorado_meta_date['blogstyle']) && $web_dorado_meta_date['blogstyle'] == "on") {
        ?>
																  
			<p>
				<?php 
        wedding_style_the_excerpt_max_charlength(220);
        ?>
			</p>									
		<?php 
    } else {
        ?>
			<p>
				<?php 
        the_content(__('More', 'WeddingStyle'));
        ?>
			</p>
		<?php 
    }
    ?>
		<a href="<?php 
    the_permalink();
    ?>
"  class="read_more read_blog"><?php 
    echo __('More', 'WeddingStyle');
    ?>
</a>	
		<div class="clear"></div>		   
	</div>
	<?php 
}
Пример #2
0
    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 {
            padding-bottom: 10px;
			margin-bottom: 5px;
            border-bottom: 1px solid #F3F3F3;
         }		
         .widget_wedding_style_exclusive_categ div:last-child div{
		    border-bottom:none !important;
         } 
         .cat_widg_cont {		 
		   float: left;
           width: 100%;
		 }
		 .cat_widg_cont h3{
		   margin-top: 0;
           line-height: 20px;
           margin-bottom: 5px !important;
		 }
		 
		.cat_widg_cont > div:last-child {
			border-bottom: 0px !important
		 }
		 
		.cat_widg_cont h3:before {
			width: 0;
			height: 0;
			border-top: solid transparent;
			border-bottom: solid transparent;
			border-width: 5px;
			content: "\27a8";
			margin-right: -5px;
			font-style: normal;
			font-weight: 100;
			font-size: 15px;
		}
		 .cat_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=' . $categ_id);
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            ?>
					<div class="cat_widg_cont">
					  <h3>
                    	<a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a>
                      </h3>
		              
					  <div class="cat_widg">	
						<?php 
            echo wedding_style_the_excerpt_max_charlength(100);
            ?>
					     &nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php 
            the_permalink();
            ?>
" style="text-decoration: underline;"><span><?php 
            echo __('More', 'WeddingStyle');
            ?>
</span></a>
					   </div>
                      <div style="clear:both;"></div>					   
					</div>
					
	<?php 
        }
        echo $after_widget;
    }
    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);
            ?>
&nbsp;&nbsp;&nbsp;&nbsp;<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;
    }