Skip to content
Custom fields for WordPress that are quick to build and quick to load. Get Pro
Docs

Quickstart

Step 3. Show it in your theme

In the template of the page (for example page.php):

1 minute to read Updated 1 week ago

PHP
<h1><?php ugly_show( 'headline' ); ?></h1>

That is all. ugly_show() prints the value, already safe for what it is.

When you need the value to decide something instead of printing it, use ugly_get():

PHP
<?php if ( ugly_get( 'headline' ) ) : ?>
	<section class="hero">
		<h1><?php ugly_show( 'headline' ); ?></h1>
	</section>
<?php endif; ?>

Did this article answer your question?