Below is the code in my front-page.php:
<div>
<h2><strong>Ultime Notizie</strong></h2>
<?php
$homepagePosts = new WP_Query (array(
‘posts_per_page => 3’
));
while($homepagePosts -> have_posts()) {
$homepagePosts -> the_post(); ?>
<div class=”blog-post”>
<figure>
<?php the_post_thumbnail(); ?>
</figure>
<div class=”blog-content”>
<a href=”<?php the_permalink(); ?>”><h3><?php echo the_title(); ?></h3></a>
<p class=”post-info”>Publicato da <?php the_author_posts_link();?>/<?php the_time(‘F d, Y’); ?>/<?php echo get_the_category_list(‘, ‘ ); ?></p>
<p><?php echo wp_trim_words(get_the_content(), 40); ?> <a href=”<?php the_permalink(); ?>”>Leggi di piu</a></p>
</div>
</div>
<?php }
echo paginate_links();
?>
</div>
In dashboard then settings then reading I set posts to show at 1.
But for some reason I do not see pagination links, what am I doing wrong?
​
[ad_2]