I pasted your code in my child theme’s style.css file but it still didn’t work ?? Below is the code I have on the template file in my child theme. Thank you for your help!
Child theme, front-page-template.php:
<div class="featured-posts-content">
<div class="row">
<div class="large-6 columns">
<?php
/**
* The first featured post
*/
// Get chosen category
$home_posts_cat = esc_attr( get_theme_mod( 'home_posts_cat' ) );
// WP_Query arguments
$args = array (
'post_type' => 'post',
'cat' => $home_posts_cat,
'posts_per_page' => '1',
'post__not_in' => get_option('sticky_posts'),
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
get_template_part( 'template-parts/content', 'homelatest' );
}
} else {
get_template_part( 'template-parts/content', 'none' );
}
// Restore original Post Data
wp_reset_postdata();
?>
</div><!-- .large-6 -->
<div class="large-6 columns ">
<ul class="large-block-grid-6 medium-block-grid-6 small-block-grid-6">
<?php
/*The next X number of posts*/
$args = array (
'post_type' => 'post',
'cat' => $home_posts_cat,
'posts_per_page' => '4',
'post__not_in' => get_option('sticky_posts'),
'offset' => '1'
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
get_template_part( 'template-parts/content', 'home' );
}
} else {
get_template_part( 'template-parts/content', 'none' );
}
// Restore original Post Data
wp_reset_postdata();
?>
</ul><!-- .large-block-grid-2 -->
</div><!-- .large-6 -->
</div><!-- .row -->
</div>