The hook block is a function that allows you to include a WordPress Action to change what WordPress is doing by default.

It currently accepts one parameter: the Hook name.

You can add show/hide conditions to your Hook from the Primary tab as required.


The easiest way to add a Heading is through the Cwicly Quick Inserter.

  • Enable the Quick Inserter.

  • Find the Quick Inserter to the left of the editor and search for Hook.

  • Click to add to the page.

You can call actions created by WordPress or third-party plugins by simply entering the hook's name in the appropriate field.

  • With the Hook block selected, open the Primary tab.

  • Input Hook name.

Or, you can create your own action through your theme's functions.php file or a code snippet plugin.

// 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);

Last updated