How to create archive page in wordpress ?


Here is the steps

inside your theme create the page name with archive-{post-tyle-name}.php

post-type-name - name of the post type, for example if your post type is News use archive-news.php

After created the add the following code in your page

<?php 
get_header();

if ( have_posts() ) :

while ( have_posts() ) : the_post();

print the_title();

the_excerpt();

endwhile;

else :

print "No content found";

endif;

get_footer();

?>


Try and add your feedback here  

Related Post


Latest Post


Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.