LIVE Monday, November 23, 2026 DOW ▲ +0.42% S&P 500 ▲ +0.65% NASDAQ ▲ +0.81%
BBBBFNEWS
BBBBF News – Breaking World, U.S. & Business Headlines
Real-time international reporting, market trends, technological breakthroughs, and in-depth global perspectives.
ALERT
WEBSITE TUTORIAL

WordPress displays articles in a specified category

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>

<?php endif; ?>