| Server IP : 152.53.162.115 / Your IP : 216.73.217.85 Web Server : Apache/2 System : Linux host 6.12.0-55.40.1.el10_0.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 21 05:54:51 EDT 2025 x86_64 User : pbshosting ( 1005) PHP Version : 8.3.30 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/pbshosting/domains/drkprakash.com/public_html/wp-content/themes/Theme16/ |
Upload File : |
<?php
include("../../../wp-blog-header.php");
$offset = $_POST['offset'];
if($_POST['next']) {
$event_arg = array(
'posts_per_page' => 2,
'post_type' => 'events',
'offset' => $offset,
'tax_query' => array(
array(
'taxonomy' => 'eventcat',
'field' => 'slug',
'terms' => array( 'paper-cutting' ),
'operator' => 'NOT IN',
)
)
);
$the_query = new WP_Query( $event_arg );
if ( $the_query -> have_posts() ) :
while ( $the_query -> have_posts() ) : $the_query -> the_post();
$content = get_the_content();
$trimmed_content = wp_trim_words( $content, 15); ?>
<input type="hidden" class="offset" value="<?php echo ($offset+2); ?>" />
<input type="hidden" class="offsetPrev" value="<?php echo ($offset-2); ?>" />
<div class="col-md-6 col-sm-12">
<div class="img-container"><img src="<?php echo wp_get_attachment_url(get_post_thumbnail_id(get_the_ID())); ?>" alt="<?php the_title(); ?>" /><div class="news-date"><i class="fa fa-calendar"></i><?php the_time('d M Y'); ?></div></div>
<!--<h3>conditions</h3>-->
<div class="col-md-12 col-sm-12"><div class="news-content">
<h4><?php the_title(); ?></h4>
<p class="hidden-xs"><?php echo $trimmed_content; ?></p>
<hr>
<div class="read-more hidden-xs"><a href="<?php the_permalink(); ?>">read more</a></div>
</div><!--content-->
</div>
</div><!-- col-6 -->
<?php endwhile; endif;
} else {
$event_arg = array(
'posts_per_page' => 2,
'post_type' => 'events',
'offset' => $offset,
'tax_query' => array(
array(
'taxonomy' => 'eventcat',
'field' => 'slug',
'terms' => array( 'paper-cutting' ),
'operator' => 'NOT IN',
)
)
);
$the_query = new WP_Query( $event_arg );
if ( $the_query -> have_posts() ) :
while ( $the_query -> have_posts() ) : $the_query -> the_post();
$content = get_the_content();
$trimmed_content = wp_trim_words( $content, 15); ?>
<input type="hidden" class="offset" value="<?php echo ($offset+2); ?>" />
<input type="hidden" class="offsetPrev" value="<?php echo ($offset-2); ?>" />
<div class="col-md-6 col-sm-12">
<div class="img-container"><img src="<?php echo wp_get_attachment_url(get_post_thumbnail_id(get_the_ID())); ?>" alt="<?php the_title(); ?>" /><div class="news-date"><i class="fa fa-calendar"></i><?php the_time('d M Y'); ?></div></div>
<!--<h3>conditions</h3>-->
<div class="col-md-12 col-sm-12"><div class="news-content">
<h4><?php the_title(); ?></h4>
<p class="hidden-xs"><?php echo $trimmed_content; ?></p>
<hr>
<div class="read-more hidden-xs"><a href="<?php the_permalink(); ?>">read more</a></div>
</div><!--content-->
</div>
</div><!-- col-6 -->
<?php endwhile; endif;
} ?>