Closed ghost closed 9 years ago
You can do something like this.
array(
'field_id' => 'raw_html_example',
'title' => __( 'Raw HTML', 'admin-page-framework-demo' ),
'type' => 'my_custom_made_up_non_exisitng_field_type',
'before_field' => "<p>This is a custom output inserted with the <code>before_field</code> argument.</p>",
'after_field' => "<p>This is a custom output inserted with the <code>after_field</code> argument.</p>",
)
Pass a non-existent field type in the type
argument and use the before_field
or after_field
argument to insert custom outputs.
Fantastic Michael, thank you for a way to do this.
This framework is seriously enjoyable to use.
Glad to hear it works and thanks for the nice words!
Also as of v3.6.1, the content
argument for the section and field definition is available.
array(
...
'content' => '<p>Your custom contents can be put here.</p>',
...
)
Hi Michael,
Is it at all possible to have a raw HTML field so that it has no input other than being used for lets say an image or extra description to the bottom of each section? I looked through the documentation and tutorials to see if there was something like this already, but didn't see anything that eluded to this possibility.