Home > CMS Tutorial > WordPress > body text

How to make a wordpress news list

藏色散人
Release: 2019-07-16 09:38:41
Original
4549 people have browsed it

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();?>
Copy after login

Call the bottom tag:

<?php get_footer();?>
Copy after login

Call the sidebar tag:

<?php get_sidebar();?>
Copy after login

3. Call the article in a loop

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
<?php endif; ?>
Copy after login

Title call:

<a href="<?php the_permalink() ?>"> <?php echo mb_strimwidth(get_the_title(), 0, 32, &#39;&#39;); ?></a>
Copy after login

Date call:

<?php the_date_xml()?>
Copy after login

Page name call:

<?php wp_title(&#39;&#39;);?>
Copy after login

4. Pagination call

<?php kriesi_pagination($query_string); ?>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!