I did what Rarst told me to do. First I searched around in the Pods Framework documentation. This solved my problem.
Here’s what the code looks like right now.
<?php
$params = array(
'orderby' => 'publish_date.meta_value DESC',
'limit' => 10
);
$fltNewsPods = pods( 'fltnews', $params );
while ($fltNewsPods->fetch()) {
echo "<li class="content-list-item">";
$podsForNewsItem = pods('fltnews', $fltNewsPods->display( 'id' ));
$podsImage = pods_image ( $podsForNewsItem->display( 'thumbnail_picture'), 'full');
if ($podsImage != ""){
$podsImage = "<div class="content-list-thumbnail-picture">" . $podsImage . "</div>";
}
printf("<a href="https://wordpress.stackexchange.com/questions/222367/%s" class="item-container">%s
<div class="content-list-body">
<div class="content-list-publisher">
<div class="date-block"><span class="date">%s</span></div>
</div>
<div class="content-list-title">%s</div>
<div class="content-list-text">%s</div>
<div class="content-list-link">Les mer</div>
</div>
</a>",
esc_url(get_permalink($podsForNewsItem->display( 'id' ))),
$podsImage,
getDateAsNorwegian($podsForNewsItem->field('publish_date')),
$podsForNewsItem->display( 'title' ),
$podsForNewsItem->display( 'excerpt' ));
echo "</li>";
}
echo $fltNewsPods->pagination( array(
'type' => 'paginate',
'prev_next' => false,
'first_last' => false
) );
echo "</ul>";
?>
It’s basically the same, although high use of the pods framework.
I guess this didn’t work with the WP_Query version because this wasn’t a custom post type, so it wasn’t using the WordPress Framework. WordPress wouldn’t know how these should be paginated.