Skip to content

Bagaimana Cara Membuat “Recent Post” dengan Sumber Berdasarkan URL yang Difilter dari Penulis? #261

Discussion options

You must be logged in to vote

Coba ini kalau di-debug keluar apa?

if ($site->is('user')) {
    $pages = Pages::from(LOT . D . 'page', 'page', true)->is(function ($v) use ($page) {
        $key = $v['author'] ?? "";
        if (!$key || '@' !== $key[0]) {
            return false;
        }
        return substr($key, 1) === $page->name;
    })->sort([-1, 'time'])->chunk(5, 0);
    test($pages->get()); // Ini keluar apa?
    exit;
}

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@taufik-nurrohman
Comment options

@yuliakbard
Comment options

@yuliakbard
Comment options

@taufik-nurrohman
Comment options

@yuliakbard
Comment options

Answer selected by yuliakbard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
x.page Page extension.
2 participants