93devs / lama
93digital Lama Utility
This package is auto-updated.
Last update: 2021-07-29 14:12:45 UTC
README
LAMA (Italian word for BLADE) is a utility class that helps you to quickly implement the Load More & dynamic filtering functionality in WordPress.
NOTE: Php >= 7.2 is required earlier version are not supported.
Installation
Composer
Run the following command in your terminal to install Lama with Composer
$ composer require "93devs/lama @dev"
Below is a basic example of getting started with the class, though your setup may be different depending on how you are using composer.
<?php require __DIR__ . '/vendor/autoload.php'; \Nine3\Lama::init();
Install manually
Download/Clone this repository and load the main class file into your theme/plugins like so:
require_once 'lama/class-lama.php'; \Nine3\Lama::init();
Development
npm/yarn is needed to compile the JS file.
npm install
or
yarn install
Build the JS
npm run build
or
yarn build
Debug
When the debug is enabled in WordPress LAMA automatically outputs, in the debug.log
file, the following information:
- the $args array parameters passed to the WP_Query (when performing the ajax request)
- the template that is trying to load for each element found
In alternative is possible to set the constant LAMA_DEBUG
to true
to output that information inside the wp-content/lama.log
file, add the following line to your starter theme/plugin:
define( 'LAMA_DEBUG', true );
Documentation
The class comes with an extensive documentation available here