Exemple complet d’un composant WordPress

<?php
/*
Template Name: Full Example
Description: Full example component
---------------------------------------------------------------------
{"type": "title", "name": "Title", "slug": "title"}
{"type": "editor", "name": "Content", "slug": "content"}
{"type": "image", "name": "Illustration", "slug": "illustration"}
{"type": "link", "name": "Link", "slug": "link"}
{"type": "id", "name": "Id", "slug": "id"}
---------------------------------------------------------------------
*/
?>
<section class="component _full -example">
	<div class="container">
		<div class="inner row">

			<article>
				<h1><?php the_wpcomponent( 'title' ) ?></h1>
			</article>

			<article>
				<?php the_wpcomponent( 'content' ) ?>
			</article>

			<article>
				<figure>
					<?php the_wpcomponent( 'illustration' ) ?>
				</figure>
			</article>

			<article>
				<a href="<?php the_wpcomponent( 'link' ) ?>">Link</a>
			</article>

			<article>
				Id : <?php the_wpcomponent( 'id' ) ?>
			</article>
			
		</div>
	</div>
</section>