Need Pagination for custom post on my blog

[ad_1]

So below appears to be the code that paginates for the main blog:

if (!function_exists(‘unblock_paging_nav’)) :
function unblock_paging_nav()
{
the_posts_pagination(array(
‘prev_text’ => is_rtl() ? ‘<i class=”bi bi-caret-right-fill”></i>’ : ‘<i class=”bi bi-caret-left-fill”></i>’,
‘next_text’ => is_rtl() ? ‘<i class=”bi bi-caret-left-fill”></i>’ : ‘<i class=”bi bi-caret-right-fill”></i>’,
‘before_page_number’ => ”
));
}
endif;

And this is the code I made to try and create pagination for my second blog roll:

if (!function_exists(‘unblock_peipaging_nav’)) :

function unblock_peipaging_nav()
{
$peiCorner = new Wp_Query(array(
“posts_per_page” => 5,
“post_type” => “event”
));
the_posts_pagination(array(
“total” => $peiCorner-> max_num_pages,
‘prev_text’ => is_rtl() ? ‘<i class=”bi bi-caret-right- fill”></i>’ : ‘<i class=”bi bi-caret-left-fill”></i>’,
‘next_text’ => is_rtl() ? ‘<i class=”bi bi-caret-left-fill”></i>’ : ‘<i class=”bi bi-caret-right-fill”></i>’,
‘before_page_number’ => ”
));
}
endif;

What am I missing?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer