Last active
February 28, 2019 23:28
-
-
Save feliciaceballos/a3dd5263867b9b0fe2788934fc2dd1c1 to your computer and use it in GitHub Desktop.
List of Posts with clickable title
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 | |
// print posts | |
foreach( $allposts as $remote_post ) { | |
$timestamp = strtotime( $remote_post->date_gmt ); | |
$date = gmdate("m/d/y",$timestamp); | |
echo '<p><a href="' .$remote_post->link.'">'.$remote_post->title->rendered.'</a> ' . $date . '</p>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment