Forum
perch_blog_custom 'start' not working
Hello again. currently I have a problem where 'start' does not affect the results of perch_blog_custom()
<?php
perch_blog_custom(array(
'template' => 'post_in_list.html',
'sort' => 'postDateTime',
'sort-order' => 'DESC',
'count' => 10,
));
// This does the same as below
perch_blog_custom(array(
'template' => 'post_in_list.html',
'sort' => 'postDateTime',
'sort-order' => 'DESC',
'count' => 10,
'start' => 3,
));
?>
Does it make a difference if you disable pagination?
Huh, yeah that seamed to do the trick.
Thanks you!
I thought that
start
doesn’t work when sorting is enabled, but disabling pagination did the trick. My use case is displaying the latest blog post completely on my home page, and then the three behind that, using two differentperch_blog_custom
functions, each using a different template. Without adding an item offset to the second usingstart
, the latest post would be displayed twice.I didn't see that pagination was indicated in the original perch blog custom code. What do you mean by "disable pagination"?