update
This commit is contained in:
@@ -6,13 +6,13 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
|
||||
function cyber_case_study_sections(){
|
||||
|
||||
if(function_exists('kc_add_map')):
|
||||
if(function_exists('kc_add_map')):
|
||||
|
||||
kc_add_map(
|
||||
|
||||
array(
|
||||
|
||||
'cyber_case_study' => array(
|
||||
'cyber_case_study' => array(
|
||||
'name' => esc_html__('EM Case Study Section', 'cyber'),
|
||||
'description' => esc_html__('Display Blog Style', 'cyber'),
|
||||
'icon' => 'kc-icon-blog-posts',
|
||||
@@ -20,7 +20,7 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
'params' => array(
|
||||
|
||||
|
||||
'General' => array(
|
||||
'General' => array(
|
||||
array(
|
||||
'name' => 'items',
|
||||
'label' => __( 'Items Limit', 'cyber' ),
|
||||
@@ -42,7 +42,7 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
'DESC' => __( 'Descending', 'cyber' ),
|
||||
'ASC' => __( 'Ascending', 'cyber' )
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'radio_image',
|
||||
'label' => __( 'Select blog Style', 'cyber' ),
|
||||
@@ -54,7 +54,7 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
),
|
||||
'description' => __( 'When select style 2 that time, set column and set gutter not work', 'cyber' ),
|
||||
'value' => '1'
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => __( 'Set Column', 'cyber' ),
|
||||
@@ -74,7 +74,7 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
'type' => 'toggle',
|
||||
'value' => 'no',
|
||||
'description' => __( 'Remove column Spacing', 'cyber' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'name' => 'show_content',
|
||||
'label' => __( 'Display Pragraph', 'cyber' ),
|
||||
@@ -91,14 +91,14 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
'type' => 'text',
|
||||
'label' => __( 'Button Text', 'cyber' ),
|
||||
'name' => 'btn_text',
|
||||
'value' => 'Read More',
|
||||
'value' => 'Read More',
|
||||
'description' => __( 'Enter Button Text', 'cyber' ),
|
||||
|
||||
|
||||
'relation' => array(
|
||||
'parent' => 'show_button',
|
||||
'show_when' => 'yes',
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => __( 'Custom class', 'cyber' ),
|
||||
@@ -156,7 +156,7 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.em-case-study-button a'),
|
||||
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.em-case-study-button a'),
|
||||
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.em-case-study-button a'),
|
||||
),
|
||||
),
|
||||
'Content' => array(
|
||||
array('property' => 'background', 'label' => 'BG Color', 'selector' => '.em-cases-study-content '),
|
||||
array('property' => 'color', 'label' => 'Color', 'selector' => '.em-cases-study-content '),
|
||||
@@ -167,7 +167,7 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.em-cases-study-content '),
|
||||
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.em-cases-study-content '),
|
||||
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.em-cases-study-content '),
|
||||
),
|
||||
),
|
||||
'Box' => array(
|
||||
array('property' => 'background'),
|
||||
array('property' => 'background-color', 'label' => 'BG Color', 'selector' => '+ .cyber-single-cases-study'),
|
||||
@@ -182,8 +182,8 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
array('property' => 'margin', 'label' => 'Margin'),
|
||||
array('property' => 'padding', 'label' => 'Padding'),
|
||||
array('property' => 'margin', 'label' => 'Position Hover', 'selector' => '+.cyber-single-cases-study:hover')
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -193,8 +193,8 @@ if(!function_exists('cyber_case_study_sections')):
|
||||
'name' => 'animate',
|
||||
'type' => 'animate'
|
||||
)
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
)// Params
|
||||
@@ -239,28 +239,28 @@ if(!function_exists('cyber_case_study_area')){
|
||||
'btn_text' => '',
|
||||
'custom_css' => '',
|
||||
'custom_class' => '',
|
||||
),$atts);
|
||||
extract( $em_blog_box );
|
||||
|
||||
),$atts);
|
||||
extract( $em_blog_box );
|
||||
|
||||
|
||||
//custom class
|
||||
|
||||
//custom class
|
||||
$wrap_class = apply_filters( 'kc-el-class', $atts );
|
||||
if( !empty( $custom_class ) ):
|
||||
$wrap_class[] = $custom_class;
|
||||
endif;
|
||||
$extra_class = implode( ' ', $wrap_class );
|
||||
|
||||
$extra_class = implode( ' ', $wrap_class );
|
||||
|
||||
|
||||
|
||||
$page = ( get_query_var( 'page' ) ? get_query_var( 'page' ) : 1 );
|
||||
$paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
|
||||
|
||||
$paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
|
||||
|
||||
|
||||
$args = array(
|
||||
'post_type' => 'em_case_study',
|
||||
'posts_per_page' => intval( $items ),
|
||||
'order' => $order ,
|
||||
'order' => $order ,
|
||||
'paged' => $paged,
|
||||
'page' => $paged
|
||||
);
|
||||
@@ -271,171 +271,176 @@ $paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
|
||||
|
||||
|
||||
|
||||
|
||||
if( $the_query->have_posts() ) {
|
||||
|
||||
if( $the_query->have_posts() ) {
|
||||
|
||||
|
||||
switch ( $layout ) {
|
||||
case '2':
|
||||
?>
|
||||
<div class=" blog_style_adn_2">
|
||||
<div class=" blog_style_adn_2">
|
||||
<div class="blog_wrap case_study_carousel owl-carousel curosel-style">
|
||||
|
||||
<?php while ($the_query->have_posts()) : $the_query->the_post();
|
||||
|
||||
<?php while ($the_query->have_posts()) : $the_query->the_post();
|
||||
|
||||
?>
|
||||
<!-- single blog -->
|
||||
<div class=" <?php if( $gutter == 'yes' ){echo 'blog_nospace_adn';}?> col-md-12 col-xs-12 col-sm-12 " >
|
||||
<div class="single_case_study <?php echo esc_attr( $extra_class ); ?>">
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="cyber-single-cases-study ">
|
||||
|
||||
<div class="cyber-single-cases-study ">
|
||||
|
||||
<!-- BLOG THUMB -->
|
||||
<?php if(has_post_thumbnail()){?>
|
||||
<div class="case-study-thumb ">
|
||||
<a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?>
|
||||
<a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="em-cases-study-content ">
|
||||
|
||||
|
||||
<!-- BLOG TITLE -->
|
||||
<div class="em-cases-study-title ">
|
||||
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
|
||||
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
|
||||
</div>
|
||||
<div class="case_category">
|
||||
<?php
|
||||
<?php
|
||||
switch(get_the_title()){
|
||||
case 'Nokia':
|
||||
{
|
||||
{
|
||||
echo '<span>Finland</span>';
|
||||
break;
|
||||
}
|
||||
case 'SoftServe':
|
||||
{
|
||||
{
|
||||
echo '<span>Ukraine / USA</span>';
|
||||
break;
|
||||
}
|
||||
case 'Microsoft Corporation':
|
||||
{
|
||||
{
|
||||
echo '<span>USA</span>';
|
||||
break;
|
||||
}
|
||||
case 'Mynavi Corporation':
|
||||
{
|
||||
{
|
||||
echo '<span>Japan</span>';
|
||||
break;
|
||||
}
|
||||
case 'Striped Giraffe':
|
||||
{
|
||||
{
|
||||
echo '<span>Germany</span>';
|
||||
break;
|
||||
}
|
||||
case 'DPDGroup IT Solutions':
|
||||
{
|
||||
{
|
||||
echo '<span>France</span>';
|
||||
break;
|
||||
}
|
||||
case 'Atlassian':
|
||||
{
|
||||
{
|
||||
echo '<span>Australia</span>';
|
||||
break;
|
||||
}
|
||||
case 'ICEYE':
|
||||
{
|
||||
{
|
||||
echo '<span>Poland / Finland</span>';
|
||||
break;
|
||||
}
|
||||
case 'TomTom':
|
||||
{
|
||||
{
|
||||
echo '<span>The Netherlands</span>';
|
||||
break;
|
||||
}
|
||||
case 'Equinix, Inc.':
|
||||
{
|
||||
{
|
||||
echo '<span>USA</span>';
|
||||
break;
|
||||
}
|
||||
case 'Kitopi':
|
||||
{
|
||||
case 'Kitopi':
|
||||
{
|
||||
echo '<span>UAE</span>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 'Intetics':
|
||||
{
|
||||
echo '<span>USA</span>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Blog Description -->
|
||||
<?php if($show_content=='yes'){?>
|
||||
|
||||
|
||||
<!-- BLOG TITLE AND CONTENT -->
|
||||
<div class="em-cases-study-inner ">
|
||||
<div class="cases-study-content ">
|
||||
<div class="cases-study-content ">
|
||||
<p><?php echo wp_trim_words( get_the_content(), 19, ' ' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Blog Read More Button -->
|
||||
<?php if($show_button=='yes'){?>
|
||||
|
||||
|
||||
<div class="em-case-study-button">
|
||||
<?php if($btn_text){?>
|
||||
<a href="<?php the_permalink(); ?>" class="learn_btn"><?php echo $btn_text;?></a>
|
||||
<i class="fa fa-long-arrow-right btn_icon"></i>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- END SINGLE BLOG -->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php endwhile; ?>
|
||||
<?php wp_reset_query(); ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
</div>
|
||||
|
||||
<?php
|
||||
break;
|
||||
default:
|
||||
?>
|
||||
<div class=" blog_style_adn_2">
|
||||
?>
|
||||
<div class=" blog_style_adn_2">
|
||||
<div class="blog_wrap case_study_carousel_main owl-carousel curosel-style style-one">
|
||||
|
||||
<?php while ($the_query->have_posts()) : $the_query->the_post();
|
||||
|
||||
<?php while ($the_query->have_posts()) : $the_query->the_post();
|
||||
|
||||
?>
|
||||
<!-- single blog -->
|
||||
<div class=" <?php if( $gutter == 'yes' ){echo 'blog_nospace_adn';}?> col-md-12 col-xs-12 col-sm-12 " >
|
||||
<div class="single_case_study <?php echo esc_attr( $extra_class ); ?>">
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="cyber-single-cases-study ">
|
||||
|
||||
<div class="cyber-single-cases-study ">
|
||||
|
||||
<!-- BLOG THUMB -->
|
||||
<?php if(has_post_thumbnail()){?>
|
||||
<div class="case-study-thumb ">
|
||||
<a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?>
|
||||
<a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="em-cases-study-content ">
|
||||
|
||||
|
||||
<!-- BLOG TITLE -->
|
||||
<div class="em-cases-study-title ">
|
||||
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
|
||||
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
|
||||
</div>
|
||||
<div class="case_category">
|
||||
<span>Marketing /</span>
|
||||
@@ -444,50 +449,50 @@ $paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
|
||||
|
||||
<!-- Blog Description -->
|
||||
<?php if($show_content=='yes'){?>
|
||||
|
||||
|
||||
<!-- BLOG TITLE AND CONTENT -->
|
||||
<div class="em-cases-study-inner ">
|
||||
<div class="cases-study-content ">
|
||||
<div class="cases-study-content ">
|
||||
<p><?php echo wp_trim_words( get_the_content(), 19, ' ' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Blog Read More Button -->
|
||||
<?php if($show_button=='yes'){?>
|
||||
|
||||
|
||||
<div class="em-case-study-button">
|
||||
<?php if($btn_text){?>
|
||||
<a href="<?php the_permalink(); ?>" class="learn_btn"><?php echo $btn_text;?></a>
|
||||
<i class="fa fa-long-arrow-right btn_icon"></i>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- END SINGLE BLOG -->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php endwhile; ?>
|
||||
<?php wp_reset_query(); ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
</div>
|
||||
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} //end have
|
||||
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user