Last active
September 26, 2016 18:50
-
-
Save dmassiani/6f37415701f7bd2738f0fc1e07eb092f to your computer and use it in GitHub Desktop.
WordPress Component - Full Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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