The details shortcode specifies additional details that the user can open and close on demand.
1{{% details [summary] [open] %}}
2CONTENT
3{{% /details %}}
summary
Position | Name | Type | Default | Required |
---|---|---|---|---|
#0 | summary | string | - | Y |
The summary of details.
open
Position | Name | Type | Default | Required |
---|---|---|---|---|
#1 | open | boolean | false | - |
When true
, expand the details by default.
1echo "Hello world!";
Source code.
1{{% details "hello.php" %}}
2```php
3echo "Hello world!";
4```
5{{% /details %}}
1console.log("Hello world!");
Source code.
1{{% details "hello.js" true %}}
2```js
3console.log("Hello world!");
4```
5{{% /details %}}