- What is log1x/pagi and how does it work with Laravel?
- Pagi is a lightweight WordPress pagination package that exposes WP_Query results through Laravel's Illuminate Pagination components. It acts as a thin compatibility layer between WordPress queries and Laravel paginator primitives, giving Sage and Acorn themes a Laravel-style API. It is not a full pagination framework, so architectural coupling stays narrow but depends on both WordPress query behavior and Illuminate internals.
- How do I install log1x/pagi in a Sage or Acorn theme?
- Install it with Composer using composer require log1x/pagi in a project that already loads Illuminate components, such as a Sage 10 or 11 theme built on Acorn. Installation is straightforward for Laravel-experienced teams because the package relies on Composer autoloading and Blade rendering. Classic WordPress teams without Composer or Illuminate should expect moderate integration effort.
- Does Pagi support Laravel 12 and which PHP version do I need?
- Version 1.1.1 is a maintenance release whose only listed enhancement is dependency bumps for Laravel 12 compatibility. Because Laravel 12 may imply newer PHP minimum versions, audit your illuminate/pagination, illuminate/support, PHP, WordPress, and Acorn constraints before upgrading. Confirm the exact illuminate and PHP ranges in v1.1.1 to ensure they still allow your installed versions.
- How do I render pagination links in a Blade template with Pagi?
- Pagi provides a simple helper and template-friendly rendering for clean, accessible page links in Blade-based Sage and Acorn themes. You typically call the helper against a query and output the paginator markup directly in your archive, search, or blog listing template. Verify the rendered classes, accessibility attributes, and custom view overrides against your theme's existing styles.
- Can Pagi paginate custom WP_Query instances, taxonomy archives, and search results?
- Pagi is designed to bridge WP_Query results into Laravel's paginator, so it can be used with archive, search, and blog listing queries as well as custom WP_Query instances. Before relying on it, test taxonomy archives, custom rewrite rules, offsets, search results, and fixed posts-per-page configurations. Pagination failures often appear as wrong page counts or broken page 2+ URLs rather than obvious errors.
- Is Pagi compatible with classic WordPress themes that do not use Composer or Blade?
- Pagi is a strong fit for Sage 10 or 11 projects using Acorn, Blade, and Composer, and only an acceptable fit for non-Sage projects that already manage Illuminate dependencies. Classic WordPress themes with no Composer or Illuminate baseline are a poor fit unless consistent, Laravel-style pagination justifies the added dependency layer. In that case, prepare to handle rendering outside the theme's usual PHP template conventions.
- How does Pagi handle SEO concerns like canonical URLs and page 2+ status codes?
- Pagi produces user-facing pagination links, but SEO correctness still depends on your WordPress rewrite rules, canonical handling, and template output. Because pagination problems can cause incorrect page counts, broken page 2+ URLs, or canonical and 404 issues, verify status codes, rel attributes, and no-index behavior in staging. Compare Pagi output against your existing paginate_links() or custom pagination before removing legacy markup.
- Can I override Pagi pagination views without forking the package?
- Pagi is described as template-friendly and built around Illuminate paginator rendering, which typically allows view customization within the host Laravel or Acorn application. The key evaluation question is whether paginator views can be overridden cleanly without forking and what fallback exists if the package lags future Laravel or WordPress releases. Test your custom markup, CSS classes, and accessibility attributes in a low-risk archive template first.
- What are the risks of using a single-maintainer package like Pagi in production?
- The main risks are dependency-constraint conflicts, PHP minimum-version movement implied by Laravel 12, reliance on WP_Query globals and rewrite behavior, and the package's small-maintainer footprint. Overall change risk for v1.1.1 is low because it is a maintenance release with no listed breaking changes, but pagination is user-facing and SEO-sensitive. Pin a known-good version, run a Composer dependency audit, and keep a prior pagination implementation behind a template flag until SEO behavior is verified.
- What alternatives to Pagi exist for WordPress pagination, and how does it compare to paginate_links()?
- The closest baseline is WordPress's built-in paginate_links() or a custom pagination implementation using WP_Query. Pagi differs by exposing WP_Query results through Laravel's Illuminate Pagination components, giving Sage and Acorn themes a Laravel-style API and Blade-friendly rendering. For teams without Composer or Illuminate, the native approach avoids added dependencies, while Laravel-experienced Sage teams may prefer Pagi's consistency.