<?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
Build Your Own Custom WordPress Theme
Building your own custom WordPress theme can be a rewarding process. It allows you to create a unique look and functionality for your website that’s tailored to your specific needs. Here’s a step-by-step guide to help you build your own...
0
0
2
WordPress completely disables the RSS function
WordPress completely disables the RSS function If you think RSS is useless, you can also disable it directly by adding the following code to the theme functions.php function: function itsme_disable_feed() { wp_die( __( ‘No feed available, please visit the <a...
0
0
1
WordPress Tutorial-How to use WordPress
Once you’ve installed WordPress, it’s time to get familiar with the software itself. Log in with your username and password, and you’ll see a dashboard that offers a clear user interface with the most common tasks at your fingertips. Navigating WordPress...
0
0
2
How To Add Pagination To WordPress
Step 1: Put the following code into the template function file functions.php of the WordPress theme you are using. function kriesi_pagination($query_string){ global $posts_per_page, $paged; $my_query = new WP_Query($query_string .”&posts_per_page=-1″); $total_posts = $my_query->post_count; if(empty($paged))$paged = 1; $prev = $paged – 1;...
0
0
1
Comments (0)