How to create One Page
-
Heloo,
I tried to create a one page and show all pages on this page like this:
Theme Linki found this code:
<?php $pages = get_pages(); foreach ($pages as $page_data) { $content = apply_filters('the_content', $page_data->post_content); $title = $page_data->post_title; $slug = $page_data->post_name; echo "<div class='$slug'>"; echo "<h2>$title</h2>"; echo $content; echo "</div>"; } ?>
Also i created two pages with style-sheet for each page background: #399 and the other page #F96 as .page1 .page2
everything working fine but without the styles.
I know maybe this is the wrong way to do that I don’t have enough experience in wordpress codes and i checked codex but my english not good to understand everything.
So please can you help me with that or is there any plugin can do this i mean like sections on one page?thanks alot
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to create One Page’ is closed to new replies.