Created
February 20, 2016 20:48
-
-
Save farinspace/657feb27580e7b2c0222 to your computer and use it in GitHub Desktop.
Noon Plugin "nooz_shortcode" filter, PHP template example.
This file contains 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 if ( $data['items'] ) { ?> | |
<div> | |
<ul> | |
<?php foreach( $data['items'] as $item ) { ?> | |
<li> | |
<time datetime="<?php echo $item['post_date']; ?>"><?php echo $item['post_date_formatted']; ?></time> | |
<h2> | |
<a href="<?php echo $item['link']; ?>"><?php echo $item['title']; ?></a> | |
</h2> | |
<p><?php echo $item['source']; ?></p> | |
<?php if ( $item['image'] ) { ?> | |
<p> | |
<a href="<?php echo $item['link']; ?>"> | |
<img src="<?php echo $item['image']; ?>" alt="<?php echo $item['title']; ?>"> | |
</a> | |
</p> | |
<?php } ?> | |
<p><?php echo $item['excerpt']; ?></p> | |
</li> | |
<?php } ?> | |
</ul> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment