Hook
The
hook
block is a function that allows you to include a WordPress Action.It currently accepts one parameter: the Hook name.
You can add show/hide conditions to your Hook from the Primary tab as required.
If you want to add a
hook
block inside a parent block:- 1.Open the Quick Insert panel in the parent block
- 2.Search for the
hook
block - 3.Input
hook
name
If you want to add a
hook
block outside any other block on the page:- 1.Click on the ➕ icon to open the Inserter Panel
- 2.Search for the
hook
block - 3.Input
hook
name
You can call actions created by WordPress or third-party plugins by simply entering the hook's name in the appropriate field.
Or, you can create your own action through your theme's functions.php file or a code snippet plugin.
functions.php
// Your function and custom name
function cwicly_custom_action()
{
echo 'This is simply echoing simple text...';
}
// This is the action that outputs the function above into the Cwicly Hook block.
// The first parameter is the name of the action, which you will use in the Cwicly hook
// The second parameter is the name of the callback function (which is run wherever the block is placed)
// The third parameter specifies the order/priority in which the functions associated with a particular action are executed.
add_action('cwicly_hook_action', 'cwicly_custom_action', 999);
If you want to add a
hook
block inside a parent block:- 1.Open the Quick Insert panel in the parent block
- 2.Search for the
hook
block - 3.Input
hook
name
If you want to add a Hook block outside any other block on the page:
- 1.Click on the ➕ icon to open the Inserter Panel
- 2.Search for the
hook
block - 3.Input
hook
name
Last modified 6mo ago