- Contributors: bobbingwide
- Tags: block, parent, link
- Requires at least: 5.4.2
- Tested up to: 6.4.2
- Stable tag: 0.5.3
- Requires PHP: 7.2.0
- License: GPL-2.0-or-later
- License URI: https://www.gnu.org/licenses/gpl-2.0.html
Show parent of the current content as a link.
Use the Parent block ( sb/parent-block ) to display a link to the parent of the current content. Works for any hierarchical post type such as pages, where the post type supports page-attributes.
- Upload the plugin files to the
/wp-content/plugins/sb-parent-block
directory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the 'Plugins' screen in WordPress
A. I hope so.
Any which are hierarchical. The post type must support 'page-attributes' in order to create a post hieraarchy.
The result will be "No parent". You can change this text using block settings.
- Parent block
Update for support for PHP 8.3
Once again delivered as a production build.
Allows user defined value for 'No parent', when the content does not have a parent.
- Note: The plugin is delivered with the Development build.
Now internationalized?
Use the Parent block (sb/parent-block) from the SB Parent block plugin to replace the Parent block previously delivered by Children block ( oik/parent-block ).
Upgrade for some improved usage notes.
Upgrade for some usage notes.
Use the Parent block in child pages to link back to the parent page.
Now implements the child list using server side rendering and supports the depth parameter
Initial version generated by npm wp-create-block
- Changed: Update build files #5
- Changed: Update wp-scripts to 26.18.0. Remove out of date webpack.config.js #5
- Changed: Add PHPUnit tests for PHP 8.3 #5
- Tested: With WordPress 6.4.2
- Tested: With PHP 8.1, PHP 8.2 and PHP 8.3
- Tested: With PHPUnit 9.6
- Changed: Enable peaceful coexistence with other single block plugins,#3
- Tested: With WordPress 5.5-RC1
- Changed: Allow user to set text to display when there's 'No parent'
- Changed: Add internationalisation and localisation logic
- Changed: Relevant code copied and cobbled from sb-children-block in preparation for delivery from wordpress.org as a Single Block ( SB ) plugin.
- Rename block from oik/parent-block to sb/parent-block #1
Only necessary if you want to build the block yourself.
- To build the block during development.
npm start
or npm run dev
Press Ctrl-C to stop the process.
- To build the block for runtime.
npm run build
The routine should terminate when the build is complete.
- To build the main file for translation
npm run makepot
- To create the block editor language files after translation
npm run makejson
Pre-requisite:
You need to have npm
- Node Package Manager - installed.
For some basic instructions see the oik-blocks summary of blocks README
Most people run the npm
command from the command line.