# Callback

This block type calls a custom function and renders its output.

### Parameters

* **callback** - callable function name;
* **params** - an array of function arguments;
* **return** - set to `true` if the function returns the result instead of echoing it.

### Example

The code below renders the WordPress site title. It calls the WordPress [get\_bloginfo](https://developer.wordpress.org/reference/functions/get_bloginfo/) function with the `show` parameter set to "name". The `return` block parameter is set to `true` because this function returns the result instead of echoing it.

```php
echo ( new HivePress\Blocks\Callback(
	[
		'callback' => 'get_bloginfo',
		'params'   => [ 'name' ],
		'return'   => true,
	]
) )->render();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivepress.io/developer-docs/framework/blocks/callback.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
