BootstraPress archived
UI wrapper of Bootstrap for WordPress.
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/kuno1/bootstrapress/releases/download/1.0.2/bootstrapress.zipReadme
bootstrapress
UI wrapper of Bootstrap for WordPress.
Installation
composer require kunoichi/bootstrapress
And in your functions.php, require vendor/autoload.php.
// functions.php
require __DIR__ . '/vendor/autoload.php';
Now you are ready!
How To Use
It simply wraps Bootstrap UI to WordPress one.
Navbar
Convert WordPress menu's HTML to suit with Bootstrap navbar.
// Pass $theme_location of your menu.
// It will be output as navbar.
new \Kunoichi\BootstraPress\NavbarMenu( 'header-menu' );
Pagination
Output Bootstrap style pagination for archive page. Wrapping it in your function because of future updates.
/**
* Output pagination for archive page.
*/
function your_theme_pagination() {
\Kunoichi\BootstraPress\PageNavi::pagination();
}
Navpages
Output links for paginated posts in Bootstrap style. Uses wp_link_pages internally.
Wrapping it in your function because of future updates.
/**
* Output pagination for archive page.
*/
function your_theme_link_pages() {
\Kunoichi\BootstraPress\PageNavi::pagination();
}
Color Extractor
You can extract colors for Gutenberg [color panel]().
/**
* Register colors.
*/
add_action( 'after_setup_theme', function() {
if ( ! class_exists( 'Kunoichi\BootstraPress\Css\Extractor' ) ) {
return;
}
$extractor = new Kunoichi\BootstraPress\Css\Extractor( get_template_directory() . '/style.css' );
$pallets = $extractor->get_color_palette();
if ( ! $pallets ) {
return;
}
$colors = [];
foreach ( $pallets as $slug => $color ) {
$colors[] = [
'name' => ucfirst( $slug ), // For i18n, consider translation function.
'slug' => $slug,
'color' => $color,
];
}
add_theme_support( 'editor-color-palette', $colors );
} );
License
GPL 3.0 and later. Compatible with WordPress.
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| 1.0.2 | Dec 2, 2022 | bootstrapress.zip | 6 |
| 0.4.3 | Mar 11, 2020 | bootstrapress.zip | 5 |
| 0.4.2 | Feb 20, 2020 | bootstrapress.zip | 4 |
| 0.4.1 | Nov 27, 2019 | bootstrapress.zip | 6 |
| 0.4.0 | Nov 15, 2019 | bootstrapress.zip | 4 |
| 0.3.0 | Nov 8, 2019 | bootstrapress.zip | 6 |
| 0.2.1 | Oct 30, 2019 | bootstrapress.zip | 4 |
| 0.2.0 | Oct 29, 2019 | bootstrapress.zip | 3 |
Active-site estimate ≈10 comes from the median of recent superseded releases. Method.