-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
37 lines (26 loc) · 779 Bytes
/
front-page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* The template for displaying the front page
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#front-page-display
*
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php the_title( '<h1>', '</h1>' ); ?>
<?php the_content(); ?>
<?php
$articles_args = [
'posts_per_page' => 6,
];
$article_query = new WP_Query( $articles_args );
?>
<?php while ( $article_query->have_posts() ) : $article_query->the_post(); ?>
<?php get_template_part( 'template-parts/content', get_post_type() ); ?>
<?php
endwhile;
wp_reset_postdata();
?>
<?php printf( '<a href="%s">%s</a>', esc_url( get_permalink( get_option( 'page_for_posts' ) ) ), esc_html( 'Kaikki uutiset' ) ); ?>
<?php endwhile; ?>
<?php get_footer();