Forum

Thread tagged as: Problem, Configuration, Blog

perch_blog_custom() pagination issue

I am using the below code to display the post listing, however on first page load the pagination is not being generated. It is generated on page refresh though. I am also displaying category links for each post.

Not sure could be causing this...?

                    perch_blog_custom(array(
                    'count' => 10,
                    'paginate' => true,
                    'page-links'=>true,
                    'hide_extensions'=>true,
                    'template' => 'post_in_list.html',
                    'sort' => 'postDateTime',
                    'sort-order' => 'DESC',
                    'each' => function($item) {
                    $item['cats_html'] = perch_blog_post_categories($item['postSlug'],array(
                            'template' => 'post_category_link.html',), true);
                    return $item;
                    },
                ));
James-Lee Rudd

James-Lee Rudd 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I thought we'd fixed that. Which version are you on?

Hi, thanks for your reply.

I am on 2.4.9 I guess I will need to upgrade then :)

Marilena

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, the fix is in Blog, but the latest Blog requires Perch 2.5.