Posts Block Lite adds a Posts block to the block editor inserter that can be added to display posts in a list, grid or carousel.
Upgrade to Pro at
https://troytempleman.com/wordpress/blocks/posts-block/.
Features
- Responsive
- Settings
- Block alignment
- Layout
- List
- Grid
- Carousel
- Text alignment
- Post type [Pro]
- Number of posts
- Order by
- Order
- Number of columns
- Column gutter width
- Display featured image
- Display title
- Add heading to title
- Title heading
- Display author
- Display date
- Display excerpt
- Maximum number of words in excerpt
- Display content
- Display link
- Link text
- Carousel
- Display dots
- Display arrows
- Infinite
- Speed
- Slides to show
- Slides to scroll
- Styles
- Color
- Text
- Background
- Link
- Carousel dots [Pro]
- Carousel dots hover [Pro]
- Carousel arrows [Pro]
- Carousel arrows hover [Pro]
- Typography
- Font family
- Font size
- Appearance
- Line height
- Letter spacing
- Text decoration
- Letter case
- Dimensions
- Padding
- Margin
- List post padding [Pro]
- List post margin [Pro]
- Grid post padding [Pro]
- Grid post margin [Pro]
- Carousel post padding [Pro]
- Carousel post margin [Pro]
- Featured image padding [Pro]
- Featured image margin [Pro]
- Title padding [Pro]
- Title margin [Pro]
- Meta padding [Pro]
- Meta margin [Pro]
- Excerpt padding [Pro]
- Excerpt margin [Pro]
- Content padding [Pro]
- Content margin [Pro]
- Link padding [Pro]
- Link margin [Pro]
- Variations [Pro]
- List [Pro]
- Grid [Pro]
- Carousel [Pro]
Demo
https://troytempleman.com/wordpress/blocks/posts-block/
HTML
Posts Block Lite will output a Posts block with the following HTML structure:
Posts Block Lite can be installed in one of the following four ways:
Automatic
To install with the built-in plugin installer:
- Login to your WordPress site at domain.com/wp-admin, where domain.com is the domain of your WordPress site.
- On the Dashboard page, in the left menu, click Plugins.
- On the Plugins page, click Add New Plugin.
- On the Add Plugins page, in the Search plugins... field, type Posts Block Lite.
- In the Search Results, locate Posts Block Lite, click Install Now and Activate.
Upload
To install with a .zip file:
- Login to your WordPress site at domain.com/wp-admin, where domain.com is the domain of your WordPress site.
- On the Dashboard page, in the left menu, click Plugins.
- On the Plugins page, click Add New Plugin.
- On the Add Plugins page, click Upload Plugin.
- Click Choose File, locate the .zip file and click Open.
- Click Install Now.
- On the Installing Plugin from uploaded file page, click Activate.
Manual
To install with a SFTP client:
- If you have a .zip file, unzip it with archiving software such as WinZip or Archive Utility.
- In a SFTP client such as WinSCP or FileZilla, connect to your WordPress site directory on your server.
- In the unzipped files, copy the posts-block-lite folder and paste on your server, in your site’s wp-content/plugins folder.
- Login to your WordPress site at domain.com/wp-admin, where domain.com is the domain of your WordPress site.
- On the Dashboard page, in the left menu, click Plugins.
- On the Plugins page, locate Posts Block Lite and click Activate.
Theme
To install in your theme instead of a plugin:
- If you have a .zip file, unzip it with archiving software such as WinZip or Archive Utility.
- In the unzipped files, copy the posts-block-lite folder and paste in your site’s theme folder, such as wp-content/themes/your-theme/inc/posts-block-lite/, where your-theme is your theme folder.
- In the unzipped files, copy the posts-block-lite folder and paste in your site’s theme folder, such as wp-content/themes/your-theme/inc/posts-block-lite/, where your-theme is your theme folder.
- In a code editor such as Visual Studio Code or Notepad++, open your theme's functions.php file.
- In your functions.php file, add the path from Step 2, such as require get_stylesheet_directory() . '/inc/posts-block-lite/posts-block-lite.php';.
- Save and close your functions.php file.
0.1.3 - September 22, 2024
- Added: Translators in
src/render.php
.
- Updated: Version in
build/block.json
and src/block.json
.
- Updated: Version in
package.json
and posts-block-lite.php
.
- Updated: Stable tag and changelog in
readme.md
and readme.txt
.
0.1.2 - September 15, 2024
- Changed: Text domains from
posts-block
to posts-block-lite
.
- Changed:
json_encode
to esc_attr( wp_json_encode )
in build/render.php
and src/render.php
.
- Changed:
wp_kses_post
filter from $posts
to $content
in build/render.php
and src/render.php
.
- Updated: Version in
build/block.json
and src/block.json
.
- Updated: Version in
package.json
and posts-block-lite.php
.
- Updated: Stable tag and changelog in
readme.md
and readme.txt
.
0.1.1 - May 20, 2024
- Added: Code to prevent direct file access in
build/render.php
and src/render.php
.
- Added: Security improvement by adding
wp_kses_post
filter to $block_content
in build/render.phpand
src/render.php`.
- Changed: Function names from
posts_block_*
to posts_block_lite_*
in posts-block-lite.php
.
- Changed: Text domains from
posts-block-lite
to posts-block
.
- Removed:
src/slick/config.rb
- Updated: Version in
build/block.json
and src/block.json
.
- Updated: Version in
package.json
and posts-block-lite.php
.
- Updated: Stable tag and changelog in
readme.md
and readme.txt
.
0.1.0 - November 15, 2023