Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionHow can I make a page on WP like this drupal site.?
Thanks
Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionhttp://jeffkoons/artwork/early-works
How can I make a page on WP like this drupal site.?
Thanks
The page consists of three columns:
1st column: All Parent Pages
2nd column: current page contents
3rd column: Child pages of current page's parent page
You do it in WordPress by creating a page template like my-custom-page.php within your theme folder and give tour template. This may look like this.
<?php /* Template Name: My Template */
get_header(); ?>
<div class= "page-contents">
<div class= "left-col">
<?php
// List all top level pages
$top = wp_list_pages( 'title_li=&child_of=0&echo=0' );
if ( $top) :
?>
<ul>
<?php echo $top; ?>
</ul>
<?php endif; ?>
</div>
<div class= "middle-col">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
//
// Post Content here
//
} // end while
} // end if
?>
</div>
<div class= "right-col">
<?php
// List all sibling pages
$siblings = wp_list_pages( 'title_li=&child_of='.$post->post_parent.'&echo=0' );
if ( $siblings) :
?>
<ul>
<?php echo $siblings; ?>
</ul>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>
Once you upload the file to your theme’s folder, go to the Pages > Add New screen in your admin dashboard. here create a new page and assign above created template.
I hope this will help you and give a start and adjust the above code to your needs.
For more information on this these links from WordPress Codex may be helpful:
wp_list_pages()
The Loop