Refactor single-em_case_study.php to enhance social media links and clean up code structure
This commit is contained in:
@@ -4,44 +4,67 @@
|
||||
*
|
||||
*/
|
||||
|
||||
get_header();
|
||||
get_header();
|
||||
cyber_signle_case_breadcrumb(); ?>
|
||||
|
||||
|
||||
<!-- BLOG AREA START -->
|
||||
<div class="cyber-blog-area cyber-blog-single single-blog-details">
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if( have_posts() ) : ?>
|
||||
|
||||
<?php while( have_posts() ) : the_post();
|
||||
$casedesc = get_post_meta( get_the_ID(),'_cyber_casedesc', true ); ?>
|
||||
|
||||
<?php while( have_posts() ) : the_post();
|
||||
$casedesc = get_post_meta( get_the_ID(),'_cyber_casedesc', true ); ?>
|
||||
|
||||
<div class="portfolio_details align-items-center">
|
||||
<div class="col-md-6 col-sm-12 col-xs-12 blog-lr">
|
||||
<div class="pimgs">
|
||||
<?php the_post_thumbnail('cyber-single-portfolio');?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 col-xs-12 blog-lr">
|
||||
<div class="portfolio-content portfolio-details-box">
|
||||
<div class="portfolio_info">
|
||||
<?php the_content(); ?>
|
||||
<div class="col-md-6 col-sm-12 col-xs-12 blog-lr">
|
||||
<div class="portfolio-content portfolio-details-box">
|
||||
<div class="portfolio_info">
|
||||
<?php the_content(); ?>
|
||||
<?php
|
||||
$webpage_url = function_exists('get_field') ? trim((string) get_field('webpage')) : '';
|
||||
$facebook_url = function_exists('get_field') ? trim((string) get_field('facebook')) : '';
|
||||
$x_url = function_exists('get_field') ? trim((string) get_field('x')) : '';
|
||||
$linkedin_url = function_exists('get_field') ? trim((string) get_field('linkedin')) : '';
|
||||
|
||||
if ($webpage_url || $facebook_url || $x_url || $linkedin_url) :
|
||||
?>
|
||||
<div class="port_dtl_social">See more at:<br>
|
||||
<?php if ($webpage_url) : ?>
|
||||
<a href="<?php echo esc_url($webpage_url); ?>" target="_blank" rel="nofollow noopener noreferrer"><i class="fa fa-globe"></i></a>
|
||||
<?php endif; ?>
|
||||
<?php if ($facebook_url) : ?>
|
||||
<a href="<?php echo esc_url($facebook_url); ?>" target="_blank" rel="nofollow noopener noreferrer"><i class="fa fa-facebook"></i></a>
|
||||
<?php endif; ?>
|
||||
<?php if ($x_url) : ?>
|
||||
<a href="<?php echo esc_url($x_url); ?>" target="_blank" rel="nofollow noopener noreferrer"><i class="fa fa-twitter"></i></a>
|
||||
<?php endif; ?>
|
||||
<?php if ($linkedin_url) : ?>
|
||||
<a href="<?php echo esc_url($linkedin_url); ?>" target="_blank" rel="nofollow noopener noreferrer"><i class="fa fa-linkedin"></i></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 blog-lr align-items-center">
|
||||
<div class="pr-title"><h2><?php the_title();?></h2></div>
|
||||
<div class="pr-title"><h2><?php the_title();?></h2></div>
|
||||
<div class="portfolio-content portfolio-details-box ">
|
||||
<div class="prots-contentg">
|
||||
<?php
|
||||
<?php
|
||||
echo wp_kses($casedesc, array(
|
||||
'blockquote' => array(),
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'title' => array()
|
||||
'title' => array()
|
||||
),
|
||||
'span' => array(),
|
||||
'h1' => array(),
|
||||
@@ -52,19 +75,19 @@ cyber_signle_case_breadcrumb(); ?>
|
||||
'strong' => array(),
|
||||
'em' => array(),
|
||||
'br' => array(),
|
||||
));
|
||||
));
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endwhile; // while has_post(); ?>
|
||||
<?php endif; // if has_post() ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END BLOG AREA START -->
|
||||
<!-- END BLOG AREA START -->
|
||||
<?php
|
||||
get_footer();
|
||||
get_footer();
|
||||
|
||||
Reference in New Issue
Block a user