| Server IP : 77.68.64.21 / Your IP : 216.73.216.219 Web Server : Apache System : Linux hp3-wp-1011378.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64 User : csh2668128 ( 2112425) PHP Version : 8.1.34 Disable Function : shell_exec,exec,system,popen,set_time_limit MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/domains/vol4/924/3261924/user/htdocs/wp-content/themes/holsworthyschool/ |
Upload File : |
<?php
/**
* The template for displaying pages
*
*/
get_header(); ?>
<div class='container'>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
// Start the loop.
while ( have_posts() ) : the_post();
?>
<h1>Latest News</h1>
<div class='row'>
<?php $the_query = new WP_Query( 'posts_per_page=5' ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<div class='col-md-5'>
<!-- <div class='mini-blog-item'> -->
<?php if (has_post_thumbnail( get_the_ID() ) ): ?>
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'single-post-thumbnail' ); ?>
<a href="<?php the_permalink() ?>">
<img class="img-fluid" src='<?php echo $image[0]; ?>'>
</a>
<?php endif; ?>
<!-- </div> -->
</div>
<div class='col-md-7'>
<div class='mini-blog-item'>
<div class='mini-blog-item-content'>
<a href="<?php the_permalink() ?>">
<h2><?php the_title(); ?></h2>
</a>
<?php
$category = get_the_category(get_the_ID());
if ($category){
echo "<p><strong>".$category[0]->cat_name."</strong></p>";
}
?>
<?php the_excerpt(); ?>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_postdata();
?>
</div>
<?php
// End of the loop.
endwhile;
?>
</main><!-- .site-main -->
</div><!-- .content-area -->
</div>
<?php get_footer(); ?>