Closed anthonymasure closed 1 year ago
You can do that with standard Kirby methods:
$similarPages = $page->similar($options)->limit(5);
Sorry to ask for details, my current code is here and I don't know how to proceed. Thanks a lot for helping me.
if (is_array($similarPages) || is_object($similarPages)) {
$first = true;
foreach($similarPages as $article) {
What's the purpose of the if statement?
All you need is
foreach($similarPages->llimit(5) as $article) {
Closing this as this doesn't seem to be an issue with the plugin
Thanks for the plugin! How can I limit the number of results?