Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have total 5 pages on my website, I want to display all pages as single page.

It is possible?

Example: http://yaremchuk.ru

share|improve this question
    
Thank you to guide Me, I have improved my question please check it –  Nikunj Jagad Sep 20 '13 at 11:49
    
Glad my answer works for you. Next time, try to post in the question your research upon a problem, and possibly the code you have written... This question is acceptable, but sure isn't the best question I've seen in this site. Of course, this comment is not a reproof, but a tip to help you on your next questions here. –  G. M. Sep 20 '13 at 13:04
add comment

1 Answer 1

up vote 1 down vote accepted

Create a child theme for your current theme. Read how to here.

After that create a file in your child theme named front-page.php. This is the first file WordPress will look for when you visit the home page of your site.

To understand why, read here.

In that file use:

<?php

get_header();

$all_pages = get_pages();
global $post;
echo '<div class="pages-container">';
foreach ( $all_pages as $post ) {
   setup_postdata($post);
   // improve the content, this is an example
   echo '<h2>' . the_title() . '</h2>';
   echo '<div class="page">' . the_content() . '</div>';
}
echo '</div>';
wp_reset_postdata();

get_footer();

The docs for function I've used are here:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.