<?php
$rand_posts = get_posts(‘numberposts=10&orderby=rand’);
foreach( $rand_posts as $post ) :
?>
<li><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></li>
<?php endforeach; ?>
wordpress display random articles
Related Articles
WordPress-Change the blog name and description
In header.php, the following two lines of code are used to display the blog name and description: ~~~ <h1 id=”logo” class=”grid_4″>BBBBF</h1> <h2 class=”grid_12 caption clearfix”>Our <span>blog</span>, keeping you up-to-date on our latest news.</h2> ~~~ The above is static code, now...
0
0
3
WordPress Tutorial-Structure your WordPress website
Each site has different needs. Is it a blog for a retail location, or a service company? Is it intended as a professional website or will it serve as an ongoing publication? Think about the services you are offering and...
0
0
3
How to Create & Customize a Child Theme on WordPress
Creating and customizing a child theme in WordPress is a good practice to ensure that your customizations are preserved when the parent theme receives updates. Here’s a step-by-step guide to create and customize a child theme: Step 1: Create a...
0
0
2
WordPress Custom Post Types
Custom Post Types in WordPress are a powerful feature that allow you to create different types of content beyond the default posts and pages. This can be especially useful if you want to manage various types of content in a...
0
0
7
Comments (0)