| Server IP : 104.129.129.72 / Your IP : 216.73.216.229 Web Server : LiteSpeed System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : answe8064 ( 1002) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/123answers.ca/public_html/wp-content/themes/directorytheme/ |
Upload File : |
<?php
/**
* The template for displaying search results pages
*/
get_header(); ?>
<div id="page-banner" class="<?php if(get_field('blog_banner', 'option')) : ?>has-banner<?php endif; ?>" style="background: <?php if(get_field('blog_banner', 'option')) : ?>url('<?php the_field('blog_banner', 'option'); ?>') no-repeat center transparent;<?php else: ?>#212121<?php endif; ?>;">
<div class="inner">
<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyseventeen' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<?php else : ?>
<h1 class="page-title"><?php _e( 'Nothing Found', 'twentyseventeen' ); ?></h1>
<?php endif; ?>
</div><!--inner-->
</div><!--page-banner-->
<div id="cp-container" class="cp-section">
<div class="inner">
<div class="full-content">
<?php if ( have_posts() ) : ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post(); ?>
<?php
$post_img = get_field('featured_image');
if (is_numeric($post_img)) {
$post_img = wp_get_attachment_url($post_img);
} else {
$post_img = get_field('featured_image');
}
$sizeimg = "img_1000x600"; // (thumbnail, medium, large, full or custom size)
$side_image = wp_get_attachment_image_src( $post_img, $sizeimg );
$content = get_the_excerpt();
$dorfi=get_field('s_default_featured_image','option');
//echo $dorfi;
// the_post_thumbnail( 'thumbnail');
$value = get_field('field_5a41e122e2b8e');
$a= wp_get_attachment_image_src( $value, $size = 'thumbnail');
//print_r($a[0]);
//echo get_the_id();
?>
<div class="col-lg-4">
<div class="blog-item">
<?php if(get_field('featured_image')){ ?>
<div class="blog-img blogimg_size">
<a href="<?php the_permalink(); ?>"><img src="<?php if(is_numeric($post_img)){ echo $a[0]; } else { echo $post_img; } ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" class="img-fluid" /></a>
<h2 class="our-blog-date"><?php echo get_the_date('j'); ?><span><?php echo get_the_date('F'); ?> <?php echo get_the_date('Y'); ?></span></h2>
</div>
<?php } else if(!empty($dorfi)) { ?>
<div class="blog-img blogimg_size">
<a href="<?php the_permalink(); ?>"><img src="<?php echo $dorfi; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" class="img-fluid" /></a>
<h2 class="our-blog-date"><?php echo get_the_date('j'); ?><span><?php echo get_the_date('F'); ?> <?php echo get_the_date('Y'); ?></span></h2>
</div>
<?php } else { ?>
<div class="blog-img blogimg_size">
<a href="<?php the_permalink(); ?>"><img src="<?php echo bloginfo("template_url").'/images/Listing-Placeholder.png'; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" class="img-fluid" /></a>
<h2 class="our-blog-date"><?php echo get_the_date('j'); ?><span><?php echo get_the_date('F'); ?> <?php echo get_the_date('Y'); ?></span></h2>
</div>
<?php } ?>
<div class="blog-entry">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php echo string_limit_words($content,15); ?>...</p>
</div>
</div><!--blog-item-->
</div><!--col-->
<?php endwhile; ?>
<?php wp_pagenavi(); ?>
<?php
// If no content, include the "No posts found" template.
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</div>
</div><!--inner-->
</div><!--cp-container-->
<script>
var divs = jQuery(".col-lg-4");
for(var i = 0; i < divs.length; i+=3) {
divs.slice(i, i+3).wrapAll("<div class='row'></div>");
}
</script>
<?php get_footer();