PHP code example of lambry / bloc
1. Go to this page and download the library: Download lambry/bloc library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lambry / bloc example snippets
// Filter to modify the main posts query arguments.
add_filter('bloc/posts/query', fn(array $args) => array_merge($args, ['author_name' => 'admin']));
// Filter to set the no results i.e empty message.
add_filter('bloc/posts/empty', function(string $message, string $display) {
return __('Sorry, there were no matching results.');
}, 10, 2);