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

Blocks

Change what a block draws

Open ugly-blocks//render.php in your theme and edit it. Inside it, ugly_get( 'name' ) and ugly_show( 'name' ) read the fields of that block.

1 minute to read Updated 1 week ago

PHP
<section class="card">
	<h3><?php ugly_show( 'title' ); ?></h3>
	<?php ugly_show( 'text' ); ?>
</section>

On the edit screen of the block, The box around the block says if the block is wrapped in a <div> that carries the alignment, colors and class the editor sets. Switch it off if your file draws its own box and calls get_block_wrapper_attributes().

Did this article answer your question?