<?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 displays articles in a specified category
<?php $posts = get_posts( “category=4&numberposts=10″ ); ?> <?php if( $posts ) : ?> <ul><?php foreach( $posts as $post ) : setup_postdata( $post ); ?> <li> <a href=”<?php the_permalink() ?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_title(); ?></a> </li> <?php endforeach; ?> </ul>...
0
0
1
WordPress displays subcategories of the current category
When making a corporate website, you need to list the corporate product categories in the sidebar of the website. If the company website has many product items, you need to set up secondary categories or subcategories. How to display subcategories...
0
0
5
How to Transfer Files Using Remote Desktop?
Transferring files between computers can seem daunting, especially when they are not on the same local network. However, with the advent of remote desktop technologies, this task has become simpler and more efficient. “How to Transfer Files Using Remote Desktop”...
0
0
3
WordPress Tutorial-WordPress settings
WordPress General Settings lets you control how your site is displayed. From here you may change your site’s title, tagline, language, and visibility. The first setting you will encounter is the Site Title. Changing your title won’t affect your URL address,...
0
0
3
Comments (0)