How do I show all post in my custom page in wordpress?
-
I have a custom page for my wordpress theme named “page-Blog.php” in the theme folder. In this page I want to show all post. I am using this code in “index.php” and “page-Blog.php” to show all post, but in “page-Blog.php” its not working but it is working in “index.php”:
<?php get_header(); ?> <?php if ( have_posts() ) : while(have_posts()) : the_post(); the_title(); // to show the title of the post the_content(); //to show the content of the post endwhile; endif; ?> <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How do I show all post in my custom page in wordpress?’ is closed to new replies.