Home >CMS Tutorial >WordPress >How to make a wordpress news list
How to make a wordpress news list
WordPress news article list page imitation site steps
1 , Make archive.php page
2. Call the header, sidebar, and footer files
Call the header tag:
<?php get_header();?>
Call the bottom tag:
<?php get_footer();?>
Call the sidebar tag:
<?php get_sidebar();?>
3. Call the article in a loop
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php endwhile; ?> <?php endif; ?>
Title call:
<a href="<?php the_permalink() ?>"> <?php echo mb_strimwidth(get_the_title(), 0, 32, ''); ?></a>
Date call:
<?php the_date_xml()?>
Page name call:
<?php wp_title('');?>
4. Pagination call
<?php kriesi_pagination($query_string); ?>
For more WordPress technical articles, please visit the WordPress Tutorial column!
The above is the detailed content of How to make a wordpress news list. For more information, please follow other related articles on the PHP Chinese website!