1. Go to this page and download the library: Download piassi/solidpress 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/ */
piassi / solidpress example snippets
use SolidPress\Core\Theme;
use SolidPress\Core\WPTemplate;
// Composer autoload
lds
if (function_exists('acf_add_local_field_group')) {
$registrable_namespaces[] = 'FieldsGroup';
$registrable_namespaces[] = 'Options';
}
// Set core registrables
$registrable_namespaces = array_merge($registrable_namespaces, [
'Taxonomies',
'PostTypes',
'Hooks',
]);
// Setup a theme instance for SolidPress
global $theme_class;
$theme_class = new Theme([
'template_engine' => new WPTemplate(),
'namespace' => 'App',
'base_folder' => 'src',
'registrable_namespaces' => $registrable_namespaces,
'theme_name' => 'solidpress-theme',
'css_dist_path' => get_template_directory_uri() . '/dist/%s.css', // %s will be replaced with page bundle css file.
'js_dist_path' => get_template_directory_uri() . '/dist/%s.js', // %s will be replaced with page bundle js file.
]);