• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Display Last 50 Posts in Archive Page

September 8, 2019

Here’s the code to add to your archive template, e.g. archives.php.

<h2>Last 50 Posts:</h2>
<ul>
<?php wp_get_archives( array( 
	'type' => 'postbypost',
	'limit' => 50,
	'format' => '',
	'before' => '<li>',
	'after' => '</li>' 
)); ?>
</ul>

<h2>Last 50 Posts:</h2> <ul> <?php wp_get_archives( array( 'type' => 'postbypost', 'limit' => 50, 'format' => '', 'before' => '<li>', 'after' => '</li>' )); ?> </ul>

Filed Under: WP Tagged With: 50, archive, last, latest, posts, wordpress

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023