Download the PHP package lambry/bloc without Composer
On this page you can find all versions of the php package lambry/bloc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package bloc
Short Description A few useful WordPress blocks and block options.
License GPL-2.0-or-later
Homepage https://github.com/lambry/bloc
Informations about the package bloc
Bloc
A few useful WordPress blocks and block options.
composer require lambry/bloc
Options
Extensions to core blocks for a little extra functionality.
Features
- Shift: Choose to shift the block up or down.
- Padding: Add padding to any and all sides of a block.
- Max width: Limit the block to maximum width.
- Animate in: Fade in a block when it's scrolled into view.
- Retrict to: Only show blocks for certain user roles.
- Visibility: Hide blocks for certain screen sizes.
Custom properties
Grid
Block to display content in a grid of rows and columns.
Features
- Display any number of items.
- Choose the number columns to show at different screen sizes.
- Add or remove spacing between columns.
- Choose the number of columns and rows any individual cell should span.
Custom properties
Slider
Block to display content in a slider, or carousel (i.e. a slider with multiple slides shown at once).
Features
- Display any number of slides.
- Choose the number slides to show a once at different screen sizes.
- Optionally add a background image to each slide.
- Optionally link the entire slide.
- Choose between slide and fade effects.
- Loop slides for an inifitnte slider.
- Show or hide the navigation arrows.
- Show or hide the pagination i.e. bullets.
- Add or remove spacing between slides.
Custom properties
Posts
Block for fetching posts, pages and custom post types and displaying them in a grid
, slider
or accordion
.
Features
- Fetch any posts, pages or custom post types.
- Filter by any taxonomies, terms and custom fields.
- Optionally offset posts or include sticky posts.
- Choose specific pages, or show all subpages for said pages.
- Order by ID, published date, modified date, title, slug, menu order, random or even a custom field.
- Choose the number of results to display per row at different screen sizes, as well the total number of results to show.
- Slider only options include: autoplay, loop, navigation and pagination.
- Accordion only options include: open first item and open one at a time.
With the posts block you could choose to show all fantasy books sorted by price that are less than $20, or properties that feature waterfront views, have 3 or more bedroom and are sorted by land size.
Templates
You can override any aspect of the display by adding template files in a folder called bloc/posts/
, the basic template heirarchy is:
grid.php
,slider.php
andaccordion.php
will override the main template/wrapper for those display types.grid-item.php
,slider-item.php
andaccordion-item.php
will override the template/display for individual posts within those display types.grid-item-{post-type}.php
,slider-item-{post-type}.php
andaccordion-item-{post-type}.php
will override the template by post type, for examplegrid-item-post.php
will overridegrid-item.php
for posts andslider-item-page.php
would overrideslider-item.php
for pages.