Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dmassiani
Last active September 26, 2016 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmassiani/6f37415701f7bd2738f0fc1e07eb092f to your computer and use it in GitHub Desktop.
Save dmassiani/6f37415701f7bd2738f0fc1e07eb092f to your computer and use it in GitHub Desktop.
WordPress Component - Full Example
<?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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment