Created
May 12, 2015 19:54
-
-
Save gabrielcesar/fc3b813dfc157a1a093b to your computer and use it in GitHub Desktop.
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
<!-- | |
wordpress_random.php | |
--> | |
<li> | |
<ul> | |
<?php | |
$posts = get_posts ( 'orderby=rand&numberposts=5' ); | |
foreach ( $posts as $post ) | |
{ | |
?> | |
<li><a href="<?php the_permalink (); ?>"><?php the_title (); ?></a></li> | |
<?php | |
} | |
?> | |
</ul> | |
</li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment