Adding pagination to 2nd custom post types
-
[redacted] the staging site https://www.marcolapegna.com/staging/
[redacted]
As you can see with the blog on main page I am getting pagination with the main theme. The second blog under PEI corner is built using a child theme and I am not getting pagination even though I have 6 posts.
This is the function I have for pagination of the custom post, it’s almost exactly the same one from the parent theme.
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;You can get access to both the parent and child theme files here if you need to look deeper. https://github.com/xVicissitudex/WordPress-Themes
I can’t for the life of me figure out why it’s not working I pretty much copied and pasted the code over.The page I need help with: [log in to see the link]
The topic ‘Adding pagination to 2nd custom post types’ is closed to new replies.